Documentation
¶
Overview ¶
Package ws will implement the WebSocket transport for the control plane. Lands in v0.2 alongside the mcpserver stdio transport.
WebSocket framing carries the canonical event envelope verbatim (see § Protocol versioning → Canonical event envelope); reconnect resumes from `lastEventId` query param.
Until then this package is intentionally empty; the architecture doc commits to the surface at § WebSocket surface.
Package ws implements the WebSocket transport for the control plane. Pure stdlib + crypto/sha1; RFC 6455 frame format.
Frames carry the canonical event envelope verbatim per the architecture doc § Canonical event envelope:
{"frame":"command","body": <Command envelope>} client → engine
{"frame":"event","body": <Event envelope>} engine → client
Reconnect resumes from a `lastEventId` query param on the connection URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is one upgraded WebSocket connection wrapped as a control.Client.
func (*Conn) IdentityClass ¶
func (c *Conn) IdentityClass() control.IdentityClass
type Handler ¶
type Handler struct {
Mux *multiplex.Mux
Encoder *auth.Encoder
Revocations *auth.RevocationList
// Optional Host/Origin guards (same shape as REST).
AllowedHosts []string
AllowedOrigins []string
}
Handler is the WebSocket-upgrading HTTP handler. Configure with the mux + auth before mounting.