Race-safe local lookup for Agent Instances.
Registry entries are keyed only by Spectre.Instance.Ref; process names,
channel identities, and conversation ids are never used as identity proof.
Summary
Functions
Starts or returns the unique supervised Instance for an Agent and Subject.
Returns the live local Instance for an Agent and Subject.
Returns the :via name for a logical Instance reference.
Functions
@spec ensure_started( GenServer.server(), module() | Spectre.AgentRef.t(), Spectre.Subject.t() | term(), keyword() ) :: DynamicSupervisor.on_start_child()
Starts or returns the unique supervised Instance for an Agent and Subject.
@spec lookup(module() | Spectre.AgentRef.t(), Spectre.Subject.t() | term(), atom()) :: {:ok, pid()} | {:error, :instance_not_found}
Returns the live local Instance for an Agent and Subject.
@spec via(Spectre.Instance.Ref.t(), atom()) :: {:via, Registry, {atom(), String.t(), Spectre.Instance.Ref.t()}}
Returns the :via name for a logical Instance reference.