service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelTasks

func CancelTasks(id uint32) error

CancelTasks cancels all tasks from operator which in status "NEW"

func Close

func Close() error

Close closes operator's GRPC connection

func CloseCommand

func CloseCommand(id uint32) error

CloseCommand closes opened command

func GetTaskOutput

func GetTaskOutput(id int64) ([]byte, error)

GetTaskOutput returns full task's output

func GetUsername

func GetUsername() string

GetUsername returns username of operator

func HelloHandshake

func HelloHandshake(ctx context.Context) error

HelloHandshake processes hadnshake from hello topic

func HelloInit

HelloInit connects to hello topic

func HelloMonitor

func HelloMonitor(ctx context.Context) error

HelloMonitor maintained control session

func Init

func Init(ctx context.Context, host string, token string) error

Init initializes operator's GRPC client

func NewCommand

func NewCommand(id uint32, cmd string, visible bool) error

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

func PollAgentTasks(agent *agent.Agent) error

PollAgentTasks starts polling of tasks for agent

func SendChatMessage

func SendChatMessage(message string) error

SendChatMessage saves message from operator in chat

func SubscribeAgents

func SubscribeAgents(ctx context.Context) error

SubscribeAgents subscribes operator on gathering agents events

func SubscribeChat

func SubscribeChat(ctx context.Context) error

SubscribeChat subscribes operator on gathering chat events

func SubscribeTasks

func SubscribeTasks(ctx context.Context) error

SubscribeTasks subscribes operator on gathering commands events

func UnpollAgentTasks

func UnpollAgentTasks(agent *agent.Agent) error

UnpollAgentTasks stop polling of tasks for agent

Types

This section is empty.

Jump to

Keyboard shortcuts

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