agentlink

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendWithResponseMsg

func SendWithResponseMsg(commandType CommandType, payload interface{}, response interface{}) error

func StartCommandSocket

func StartCommandSocket(agentClientObj *agent_client.AgentClient)

func StopCommandSocket

func StopCommandSocket()

Types

type CommandMsg

type CommandMsg struct {
	Command CommandType `msgpack:"c"`
	Payload []byte      `msgpack:"p"`
}

func (*CommandMsg) Unmarshal

func (c *CommandMsg) Unmarshal(v interface{}) error

type CommandType

type CommandType int
const (
	CommandNil CommandType = iota
	CommandConnect
	CommandSpaceNote
	CommandSpaceStop
	CommandSpaceRestart
)

type ConnectResponse

type ConnectResponse struct {
	Success bool   `msgpack:"s"`
	Server  string `msgpack:"sv"`
	Token   string `msgpack:"t"`
}

type RunCommandRequest added in v0.19.0

type RunCommandRequest struct {
	Command string `json:"command" msgpack:"command"`
	Timeout int    `json:"timeout" msgpack:"timeout"`
	Workdir string `json:"workdir" msgpack:"workdir"`
}

type RunCommandResponse added in v0.19.0

type RunCommandResponse struct {
	Success bool   `json:"success" msgpack:"success"`
	Error   string `json:"error" msgpack:"error"`
}

type SpaceNoteRequest

type SpaceNoteRequest struct {
	Note string `json:"note" msgpack:"note"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL