adk_mcp_pool (erlang_adk v0.10.0)
View SourceBounded FIFO connection pool for MCP clients.
Connections are leased to one borrower at a time. Borrower death and explicit cancellation always discard the connection because an in-flight request may have reached the peer. The pool reconnects for future leases; request/4 never replays a callback, and reports mutating disconnects as an uncertain delivery instead of risking duplicate effects.
Summary
Functions
-spec checkout(pid(), pos_integer()) -> {ok, reference(), term()} | {error, term()}.
-spec child_spec(map()) -> supervisor:child_spec().
-spec request(pid(), read_only | mutation, fun((term()) -> term()), pos_integer()) -> term().
-spec start(map()) -> gen_server:start_ret().
-spec start_link(map()) -> gen_server:start_ret().
-spec stop(pid()) -> ok.