Documentation
¶
Index ¶
- Constants
- func Unmarshal[T any, PT interface{ ... }](msg AgentMessage) (T, error)
- type AgentMessage
- type ClientShellClosedMessage
- type CreateShellMessage
- type MessageUnmarshaler
- type RunnerHeartbetMessage
- type RunnerUpdateMessage
- type ShellDataMessage
- type ShellExitMessage
- type ShellReadyMessage
- type ShellResizeMessage
Constants ¶
View Source
const ( // MessageTypeHeartbeat represents a heartbeat message sent // by the agent. MessageTypeHeartbeat byte = 0x01 // MessageTypeStatusMessage is a status message setnt by the agent MessageTypeStatusMessage byte = 0x03 // Shell session messages MessageTypeCreateShell byte = 0x04 MessageTypeShellReady byte = 0x05 MessageTypeShellData byte = 0x06 MessageTypeShellResize byte = 0x07 MessageTypeShellExit byte = 0x08 MessageTypeClientShellClosed byte = 0x09 )
Variables ¶
This section is empty.
Functions ¶
func Unmarshal ¶
func Unmarshal[T any, PT interface { *T MessageUnmarshaler }](msg AgentMessage) (T, error)
Unmarshal unmarshals AgentMessage data into a specific message type using generics
Types ¶
type AgentMessage ¶
func UnmarshalAgentMessage ¶
func UnmarshalAgentMessage(data []byte) (AgentMessage, error)
func (AgentMessage) Marshal ¶
func (a AgentMessage) Marshal() []byte
type ClientShellClosedMessage ¶
type ClientShellClosedMessage struct {
SessionID [16]byte
}
func (*ClientShellClosedMessage) ID ¶
func (c *ClientShellClosedMessage) ID() string
func (ClientShellClosedMessage) Marshal ¶
func (c ClientShellClosedMessage) Marshal() []byte
func (*ClientShellClosedMessage) UnmarshalFromAgentMessage ¶
func (c *ClientShellClosedMessage) UnmarshalFromAgentMessage(data []byte) error
type CreateShellMessage ¶
func (*CreateShellMessage) ID ¶
func (c *CreateShellMessage) ID() string
func (CreateShellMessage) Marshal ¶
func (c CreateShellMessage) Marshal() []byte
func (*CreateShellMessage) UnmarshalFromAgentMessage ¶
func (c *CreateShellMessage) UnmarshalFromAgentMessage(data []byte) error
type MessageUnmarshaler ¶
MessageUnmarshaler defines types that can unmarshal from AgentMessage data
type RunnerHeartbetMessage ¶
func (RunnerHeartbetMessage) Marshal ¶
func (s RunnerHeartbetMessage) Marshal() []byte
func (*RunnerHeartbetMessage) UnmarshalFromAgentMessage ¶
func (s *RunnerHeartbetMessage) UnmarshalFromAgentMessage(data []byte) error
type RunnerUpdateMessage ¶
func (RunnerUpdateMessage) Marshal ¶
func (s RunnerUpdateMessage) Marshal() []byte
func (*RunnerUpdateMessage) UnmarshalFromAgentMessage ¶
func (s *RunnerUpdateMessage) UnmarshalFromAgentMessage(data []byte) error
type ShellDataMessage ¶
func (*ShellDataMessage) ID ¶
func (c *ShellDataMessage) ID() string
func (ShellDataMessage) Marshal ¶
func (c ShellDataMessage) Marshal() []byte
func (*ShellDataMessage) UnmarshalFromAgentMessage ¶
func (c *ShellDataMessage) UnmarshalFromAgentMessage(data []byte) error
type ShellExitMessage ¶
type ShellExitMessage struct {
SessionID [16]byte
}
func (*ShellExitMessage) ID ¶
func (c *ShellExitMessage) ID() string
func (ShellExitMessage) Marshal ¶
func (c ShellExitMessage) Marshal() []byte
func (*ShellExitMessage) UnmarshalFromAgentMessage ¶
func (c *ShellExitMessage) UnmarshalFromAgentMessage(data []byte) error
type ShellReadyMessage ¶
func (*ShellReadyMessage) ID ¶
func (c *ShellReadyMessage) ID() string
func (ShellReadyMessage) Marshal ¶
func (c ShellReadyMessage) Marshal() []byte
func (*ShellReadyMessage) UnmarshalFromAgentMessage ¶
func (c *ShellReadyMessage) UnmarshalFromAgentMessage(data []byte) error
type ShellResizeMessage ¶
func (*ShellResizeMessage) ID ¶
func (c *ShellResizeMessage) ID() string
func (ShellResizeMessage) Marshal ¶
func (c ShellResizeMessage) Marshal() []byte
func (*ShellResizeMessage) UnmarshalFromAgentMessage ¶
func (c *ShellResizeMessage) UnmarshalFromAgentMessage(data []byte) error
Click to show internal directories.
Click to hide internal directories.