adk_scope_shard_router (erlang_adk v0.7.0)

View Source

Bounded exact-scope router shared by sharded artifact and memory APIs.

The router performs only validation and worker lookup/startup. Calls are made directly to the resolved adapter process, so unrelated exact scopes do not serialize behind one storage GenServer. Each router owns an anonymous dynamic supervisor and stops when its creator exits.

Summary

Types

handle/0

-type handle() :: {adk_scope_shard, pid(), ets:tid(), atomics:atomics_ref(), pos_integer()}.

Functions

capabilities(Handle)

-spec capabilities(handle()) -> {ok, map()} | {error, term()}.

code_change(OldVersion, State, Extra)

handle_call(Request, From, State)

handle_cast(Message, State)

handle_info(Message, State)

init(_)

resolve(Handle, Scope, Timeout)

-spec resolve(handle(), term(), pos_integer()) -> {ok, module(), pid()} | {error, term()}.

start_link(Kind, Adapter, AdapterConfig, Options)

-spec start_link(artifact | memory, module(), map(), map()) -> {ok, handle()} | {error, term()}.

status(Handle)

-spec status(handle()) -> {ok, map()} | {error, term()}.

stop(Handle)

-spec stop(handle()) -> ok | {error, term()}.

terminate(Reason, State)

validate_adapter(Kind, Adapter)

-spec validate_adapter(artifact | memory, module()) -> ok | {error, term()}.