Documentation
¶
Overview ¶
Package connectedws supplies the bounded, tracked transport for external service connections. Protocol authentication and command semantics stay in each plugin
Index ¶
Constants ¶
const MaxFrame = 4 << 20
const MaxRequest = 64 << 10
Variables ¶
var ErrClosed = errors.New("WebSocket connection closed; reconnect to refresh state")
Functions ¶
func CommandError ¶
Distinguish confirmed rejection from an uncertain command outcome
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client owns at most one authenticated session, including an in-progress dial Close is reusable: settings changes and the last unbind cancel outstanding work, while a later binding can establish a fresh session. No request is replayed
type Rejected ¶
type Rejected struct{ Operation string }
Rejected distinguishes an authoritative server rejection from an uncertain delivery (disconnect/timeout). Callers must never retry either kind of write
type Route ¶
type Route func(json.RawMessage) (string, error)
Route validates a protocol envelope, returns a response ID for correlated replies, and handles unsolicited events synchronously. It must not block on a request