Documentation
¶
Overview ¶
Package readyproto defines the newline-delimited JSON handshake toolboxd sends to sandboxd when a Docker sandbox's agent is ready to serve.
Index ¶
Constants ¶
View Source
const ( // EventReady is the guest→host readiness announcement after adopt or cold boot. EventReady = "ready" // EventParked is the guest→host hello from a warm-pool slot awaiting adopt. EventParked = "parked" // EventAdopt is the host→guest frame that binds real sandbox identity. EventAdopt = "adopt" // MaxLineBytes caps attacker-controlled read size on the host listener. MaxLineBytes = 4 << 10 )
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(w io.Writer, sig ReadySignal) error
Encode writes one newline-terminated JSON line.
func EncodeAdopt ¶
func EncodeAdopt(w io.Writer, frame AdoptFrame) error
EncodeAdopt writes a host→guest adopt frame.
func EncodeParked ¶
func EncodeParked(w io.Writer, sig ParkedSignal) error
EncodeParked writes a parked hello line.
Types ¶
type AdoptFrame ¶
type AdoptFrame struct {
Event string `json:"event"`
SandboxID string `json:"sandbox_id"`
Token string `json:"token"`
Nonce string `json:"nonce"`
}
AdoptFrame is the host→guest identity bind during warm-pool adoption.
func DecodeAdopt ¶
func DecodeAdopt(r io.Reader) (AdoptFrame, error)
DecodeAdopt reads a host→guest adopt frame.
type ParkedSignal ¶
type ParkedSignal struct {
Event string `json:"event"`
Token string `json:"token"`
Nonce string `json:"nonce"`
AgentVersion string `json:"agent_version,omitempty"`
}
ParkedSignal is the guest→host parked-slot hello.
func DecodeParked ¶
func DecodeParked(r io.Reader) (ParkedSignal, error)
DecodeParked reads a guest→host parked hello.
Click to show internal directories.
Click to hide internal directories.