Gralkor.Client.InMemory (jido_gralkor v3.0.0)

Copy Markdown View Source

In-memory twin of Gralkor.Client for tests.

Configure responses per operation before exercising the code under test; inspect the calls that were made after. Operations with no configured response return {:error, :not_configured} — tests should set every response they expect the code under test to hit.

Summary

Functions

Returns a specification to start this module under a supervisor.

Reset all state — call in setup.

Set the response for the next (and all subsequent) build_communities/1 calls.

Set the response for the next (and all subsequent) build_indices/0 calls.

Set the response for the next (and all subsequent) capture/3 calls.

Set the response for the next (and all subsequent) flush/1 calls.

Set the response for the next (and all subsequent) flush_and_await/2 calls.

Set the response for the next (and all subsequent) memory_add/3 calls.

Set the response for the next (and all subsequent) recall/3 calls.

Functions

adds()

captures()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

communities_builds()

flush_and_awaits()

flushes()

indices_builds()

recalls()

reset()

Reset all state — call in setup.

set_build_communities(response)

Set the response for the next (and all subsequent) build_communities/1 calls.

set_build_indices(response)

Set the response for the next (and all subsequent) build_indices/0 calls.

set_capture(response)

Set the response for the next (and all subsequent) capture/3 calls.

set_flush(response)

Set the response for the next (and all subsequent) flush/1 calls.

set_flush_and_await(response)

Set the response for the next (and all subsequent) flush_and_await/2 calls.

set_memory_add(response)

Set the response for the next (and all subsequent) memory_add/3 calls.

set_recall(response)

Set the response for the next (and all subsequent) recall/3 calls.

start_link(opts \\ [])