Documentation
¶
Index ¶
- func CancelTasks(id uint32) error
- func Close() error
- func CloseCommand(id uint32) error
- func GetTaskOutput(id int64) ([]byte, error)
- func GetUsername() string
- func HelloHandshake(ctx context.Context) error
- func HelloInit(ctx context.Context) (grpc.ServerStreamingClient[operatorv1.HelloResponse], error)
- func HelloMonitor(ctx context.Context) error
- func Init(ctx context.Context, host string, token string) error
- func NewCommand(id uint32, cmd string, visible bool) error
- func NewCommandMessage(id uint32, tm shared.TaskMessage, message string) error
- func NewTask(id uint32, v *operatorv1.CreateTaskRequest) error
- func PollAgentTasks(agent *agent.Agent) error
- func SendChatMessage(message string) error
- func SubscribeAgents(ctx context.Context) error
- func SubscribeChat(ctx context.Context) error
- func SubscribeTasks(ctx context.Context) error
- func UnpollAgentTasks(agent *agent.Agent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelTasks ¶
CancelTasks cancels all tasks from operator which in status "NEW"
func GetTaskOutput ¶
GetTaskOutput returns full task's output
func HelloHandshake ¶
HelloHandshake processes hadnshake from hello topic
func HelloInit ¶
func HelloInit(ctx context.Context) (grpc.ServerStreamingClient[operatorv1.HelloResponse], error)
HelloInit connects to hello topic
func HelloMonitor ¶
HelloMonitor maintained control session
func NewCommand ¶
NewCommand creates new command
func NewCommandMessage ¶
func NewCommandMessage(id uint32, tm shared.TaskMessage, message string) error
NewCommandMessage saves message for command
func NewTask ¶
func NewTask(id uint32, v *operatorv1.CreateTaskRequest) error
NewTask creates new task in command
func PollAgentTasks ¶
PollAgentTasks starts polling of tasks for agent
func SendChatMessage ¶
SendChatMessage saves message from operator in chat
func SubscribeAgents ¶
SubscribeAgents subscribes operator on gathering agents events
func SubscribeChat ¶
SubscribeChat subscribes operator on gathering chat events
func SubscribeTasks ¶
SubscribeTasks subscribes operator on gathering commands events
func UnpollAgentTasks ¶
UnpollAgentTasks stop polling of tasks for agent
Types ¶
This section is empty.