Documentation
¶
Index ¶
- Constants
- Variables
- func ReadDataPacket(r io.Reader) (int, []byte, error)
- func ReadUint16PrefixedData(r io.Reader) ([]byte, error)
- func SerializeDataPacket(payloadID int, data []byte) ([]byte, error)
- func WriteDataPacket(w io.Writer, n int, data []byte) error
- func WriteUint16PrefixedData(w io.Writer, data []byte) error
- type DebuggerSettings
- type SaveFilesSettings
Constants ¶
View Source
const ( // TermID is a magic byte to identify the connection is from the terminal. TermID = 0x01 // ShellID is a magic byte to identify the connection is from the shell. ShellID = 0x02 )
View Source
const ( // StartShellSession identifies the start of a shell session data packet. StartShellSession = 0x01 // EndShellSession identifies the end of a shell session data packet. EndShellSession = 0x02 // PtyData identifies the pseudo terminal (pty) data payload packet. PtyData = 0x03 // WinSizeData identifies the terminal window data payload packet. WinSizeData = 0x04 )
View Source
const ( // DebuggerSettingsSecretsKey stores the secrets key name. DebuggerSettingsSecretsKey = "earthly_debugger_settings" // DebuggerDefaultSocketPath is the default socket to connect to (path is inside the container). DebuggerDefaultSocketPath = "/var/run/earthly_interactive" // DefaultSaveFileSocketPath is the default socket to connect to when sending back files // (path is inside the container). DefaultSaveFileSocketPath = "/var/run/earthly_save" )
Variables ¶
View Source
var ( // ErrDataOverflow occurs when too much data is sent. ErrDataOverflow = errors.New("data overflow") // ErrDataUnderflow occurs when too little data is received. ErrDataUnderflow = errors.New("data underflow") )
Functions ¶
func ReadDataPacket ¶
ReadDataPacket decodes a data packet from the reader.
func ReadUint16PrefixedData ¶
ReadUint16PrefixedData first reads a uint16 then reads that many bytes of data.
func SerializeDataPacket ¶
SerializeDataPacket returns a serialized a data packet.
func WriteDataPacket ¶
WriteDataPacket writes a data packet to the writer.
Types ¶
type DebuggerSettings ¶
type DebuggerSettings struct {
SocketPath string `json:"socketPath"`
Term string `json:"term"`
SaveFiles []SaveFilesSettings `json:"saveFiles"`
DebugLevelLogging bool `json:"debugLevel"`
Enabled bool `json:"enabled"`
}
DebuggerSettings is used to pass settings to the debugger.
type SaveFilesSettings ¶
type SaveFilesSettings struct {
Src string `json:"src"`
Dst string `json:"dst"`
IfExists bool `json:"ifExists"`
}
SaveFilesSettings is used to pass SAVE ARTIFACT ... AS LOCAL ... commands to the debugger which sends them back on failure.
Click to show internal directories.
Click to hide internal directories.