Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID string
DeviceName string
ServerURL string
SecurityKey string
Sessions map[string]*Session
Conn *jsonrpc2.Conn
// contains filtered or unexported fields
}
Agent represents the agent that connects to the server.
func NewWithSecurityKey ¶
NewWithSecurityKey creates a new Agent instance with authentication.
func (*Agent) AddSession ¶
AddSession adds a session to the agent.
func (*Agent) GetSession ¶
GetSession returns a session by ID.
func (*Agent) RemoveSession ¶
RemoveSession removes a session from the agent.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements jsonrpc2.Handler to process server commands.
func NewHandler ¶
NewHandler creates a new handler for the agent.
Click to show internal directories.
Click to hide internal directories.