Documentation
¶
Overview ¶
Package mcpserverinfo serializes the bounded MCP channel metadata that tunnel-client advertises to the tunnel control plane.
Index ¶
Constants ¶
const ( // HeaderName is the protected control-plane header carrying MCP channel // capability and process-affinity metadata. HeaderName = "X-Tunnel-MCP-Server-Info" // MaxChannels bounds the number of channel declarations in one header. MaxChannels = 32 // MaxHeaderBytes bounds the serialized HTTP header value. MaxHeaderBytes = 4096 )
Variables ¶
This section is empty.
Functions ¶
func Build ¶ added in v0.0.13
func Build(declarations []Declaration) (string, error)
Build serializes the narrowest header version that can represent the declarations. Headers remain v1 unless at least one channel advertises the v2-only stateless capability.
func BuildV1 ¶
func BuildV1(declarations []Declaration) (string, error)
BuildV1 serializes the exact v1 header shape after validating that every declaration is canonical, unique, and within the protocol bounds.
Types ¶
type Declaration ¶
Declaration is one canonical MCP channel name and its advertised capabilities. Stateless and ProcessAffinity are independent: a channel may accept self-contained requests while still requiring one tunnel-client process for application-local state.