Documentation
¶
Index ¶
Constants ¶
View Source
const ( FrameJSON byte = 0x01 // JSON control message FrameBinary byte = 0x02 // Raw binary data (file content, tar, stdin/stdout) FramePing byte = 0x03 // Ping/pong (payload: 0x00 = ping, 0x01 = pong) )
Frame types for the daemon ↔ agent binary protocol.
View Source
const ( PingRequest byte = 0x00 PingResponse byte = 0x01 )
Ping/pong payload values.
View Source
const ( // Filesystem OpFsRead = "fs.read" OpFsWrite = "fs.write" OpFsList = "fs.list" OpFsStat = "fs.stat" OpFsRemove = "fs.remove" OpFsRename = "fs.rename" OpFsMkdir = "fs.mkdir" OpFsUpload = "fs.upload" OpFsDownload = "fs.download" // Process OpProcessExec = "process.exec" OpProcessStream = "process.stream" OpProcessSpawn = "process.spawn" OpProcessPty = "process.pty" OpProcessResize = "process.resize" // Streaming process output notifications OpProcessOutput = "process.output" OpProcessDone = "process.done" // Environment OpEnvGet = "env.get" OpEnvSet = "env.set" OpEnvDelete = "env.delete" OpEnvList = "env.list" // Network OpNetFetch = "net.fetch" // Template OpTemplateSave = "template.save" // Session OpSessionResumed = "session.resumed" OpSessionReplaced = "session.replaced" OpSessionNegotiateE2E = "session.negotiate_e2e" )
Operation names for the sandbox API.
View Source
const ChunkSize = 1 * 1024 * 1024
ChunkSize is the size of each chunk for chunked file transfers (1MB). Files larger than this are split into multiple binary frames.
View Source
const ChunkThreshold = 1 * 1024 * 1024
ChunkThreshold is the file size above which chunked transfer is used.
View Source
const MaxFrameSize = 10 * 1024 * 1024
MaxFrameSize is the maximum allowed frame payload size (10MB). Frames exceeding this limit cause an immediate connection close.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct {
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params interface{} `json:"params,omitempty"`
}
Notification is a JSON-RPC 2.0 notification (no ID).
type RPCError ¶
type RPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
RPCError is a JSON-RPC 2.0 error object.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package crypto provides X25519 key exchange and AES-256-GCM encryption for end-to-end encrypted communication between SDK clients and guest agents.
|
Package crypto provides X25519 key exchange and AES-256-GCM encryption for end-to-end encrypted communication between SDK clients and guest agents. |
Click to show internal directories.
Click to hide internal directories.