adk_scope_shard_router (erlang_adk v0.10.0)
View SourceBounded 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
Functions
Release the exact per-operation lease returned by resolve/3. Passing the token rather than looking it up by scope prevents a crashed worker's late cleanup from decrementing a replacement worker's lease.
Types
-type handle() :: {adk_scope_shard, pid(), ets:tid(), atomics:atomics_ref(), pos_integer()}.
Functions
Release the exact per-operation lease returned by resolve/3. Passing the token rather than looking it up by scope prevents a crashed worker's late cleanup from decrementing a replacement worker's lease.
-spec resolve(handle(), term(), pos_integer()) -> {ok, module(), pid(), operation_lease()} | {error, term()}.