Backplane.McpProtocol.Client.Subscription (backplane_mcp_protocol v0.5.0)

Copy Markdown

Cancellable client handle and owner process for one modern subscription.

The client process owns a process-local ID registry while this process owns the acknowledgement gate and transport stream. This keeps long-lived stream state out of the ordinary request table and lets HTTP and stdio use their distinct cancellation mechanisms.

Summary

Functions

Returns a specification to start this module under a supervisor.

Normalizes the public list shorthand or the frozen wire filter map.

Types

id()

@type id() :: String.t() | integer()

t()

@type t() :: %Backplane.McpProtocol.Client.Subscription{
  acknowledged?: boolean(),
  client: pid(),
  id: id(),
  notifications: map() | nil,
  pid: pid(),
  requested_notifications: map(),
  stream: term(),
  subscriber: pid(),
  transport: map() | nil
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

normalize_filters(filters)

@spec normalize_filters(list() | map()) ::
  {:ok, map()} | {:error, Backplane.McpProtocol.MCP.Error.t()}

Normalizes the public list shorthand or the frozen wire filter map.