Backplane. McpProtocol. Server. Modern. Subscriptions
(backplane_mcp_protocol v0.6.0)
Copy Markdown
Monitored, in-process subscription hub for modern MCP notification streams.
The hub serializes subscription establishment and publication so its ACK is always queued before any event published after subscribe returns.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gracefully completes every current subscription without stopping the hub.
Types
@type option() :: {:name, GenServer.name()} | GenServer.option()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(GenServer.server()) :: :ok
Gracefully completes every current subscription without stopping the hub.
@spec publish(GenServer.server(), map()) :: :ok
@spec start_link([option()]) :: GenServer.on_start()
@spec subscribe(GenServer.server(), pid(), map()) :: {:ok, reference()} | {:error, Backplane.McpProtocol.MCP.Error.t()}
@spec unsubscribe(GenServer.server(), reference()) :: :ok