Documentation
¶
Index ¶
- func GetConnectionInfo() (server, token string, err error)
- func IsAgentRunning() bool
- func SendWithResponseMsg(commandType CommandType, payload interface{}, response interface{}) error
- func StartCommandSocket(agentClientObj *agent_client.AgentClient) chan struct{}
- func StopCommandSocket()
- type CommandMsg
- type CommandType
- type ConnectResponse
- type ForwardPortRequest
- type ListPortForwardsResponse
- type PortForwardInfo
- type RunCommandRequest
- type RunCommandResponse
- type SpaceFieldRequest
- type SpaceGetFieldRequest
- type SpaceGetFieldResponse
- type SpaceNoteRequest
- type StopPortForwardRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnectionInfo ¶ added in v0.23.0
GetConnectionInfo retrieves connection information from the running agent Returns server URL and auth token
func IsAgentRunning ¶ added in v0.21.0
func IsAgentRunning() bool
func SendWithResponseMsg ¶
func SendWithResponseMsg(commandType CommandType, payload interface{}, response interface{}) error
func StartCommandSocket ¶
func StartCommandSocket(agentClientObj *agent_client.AgentClient) chan struct{}
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 CommandSpaceSetField CommandSpaceGetField CommandSpaceStop CommandSpaceRestart CommandForwardPort CommandListPortForwards CommandStopPortForward )
type ConnectResponse ¶
type ForwardPortRequest ¶ added in v0.22.0
type ListPortForwardsResponse ¶ added in v0.22.0
type ListPortForwardsResponse struct {
Forwards []PortForwardInfo `json:"forwards" msgpack:"forwards"`
}
type PortForwardInfo ¶ added in v0.22.0
type RunCommandRequest ¶ added in v0.19.0
type RunCommandResponse ¶ added in v0.19.0
type SpaceFieldRequest ¶ added in v0.21.5
type SpaceGetFieldRequest ¶ added in v0.21.5
type SpaceGetFieldRequest struct {
Name string `json:"name" msgpack:"name"`
}
type SpaceGetFieldResponse ¶ added in v0.21.5
type SpaceGetFieldResponse struct {
Value string `json:"value" msgpack:"value"`
}
type SpaceNoteRequest ¶
type SpaceNoteRequest struct {
Note string `json:"note" msgpack:"note"`
}
type StopPortForwardRequest ¶ added in v0.22.0
type StopPortForwardRequest struct {
LocalPort uint16 `json:"local_port" msgpack:"local_port"`
}
Click to show internal directories.
Click to hide internal directories.