Jido.RuntimeStore
(Jido v2.2.0)
View Source
Instance-scoped runtime key/value store for mutable Jido coordination state.
RuntimeStore is an internal control-plane store owned by each Jido instance.
It backs ephemeral runtime data that needs a stable home outside individual
agent processes, such as logical parent-child relationship bindings.
The ETS table itself is owned by the Jido instance supervisor, while the
RuntimeStore process provides the logical API. That lets the table survive
RuntimeStore process restarts without making it durable beyond the life of
the owning Jido instance.
Values are organized into named hives so unrelated runtime concerns can share the same store without colliding:
:ok = Jido.RuntimeStore.put(MyApp.Jido, :relationships, "child-1", %{parent_id: "p-1"})
{:ok, binding} = Jido.RuntimeStore.fetch(MyApp.Jido, :relationships, "child-1")
:ok = Jido.RuntimeStore.delete(MyApp.Jido, :relationships, "child-1")The store is intentionally ephemeral. It is reset when the owning Jido instance stops or restarts.
Summary
Functions
Deletes a value from the given hive.
Fetches a value from the given hive.
Returns a value from the given hive, or default when no value exists.
Lists all {key, value} entries in the given hive.
Stores a value in the given hive.
Starts a RuntimeStore process.
Types
Functions
Deletes a value from the given hive.
Fetches a value from the given hive.
Returns {:ok, value} when present, or :error when the key or store is
unavailable.
Returns a value from the given hive, or default when no value exists.
Lists all {key, value} entries in the given hive.
Stores a value in the given hive.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a RuntimeStore process.