Documentation
¶
Index ¶
Constants ¶
View Source
const ( ChannelControl = "control" TypeChange = "change" TypeError = "error" TypeStreamOpen = "stream.open" TypeStreamData = "stream.data" TypeStreamCloseWrite = "stream.close_write" TypeStreamClose = "stream.close" )
Variables ¶
This section is empty.
Functions ¶
func Payload ¶
func Payload(v any) json.RawMessage
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn serializes websocket writes and exposes a small frame API for the sandbox agent control socket.
func (*Conn) CloseOnDone ¶
type Frame ¶
type Frame struct {
Version int `json:"version"`
ID string `json:"id,omitempty"`
Channel string `json:"channel"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
Payload json.RawMessage `json:"payload,omitempty"`
Data []byte `json:"data,omitempty"`
}
Frame is the shared sandbox agent control socket envelope. Control changes carry JSON in Payload. Stream frames use Channel as the stream name and carry optional JSON metadata in Payload plus raw bytes in Data.
Click to show internal directories.
Click to hide internal directories.