c2

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Teamserver
	Log *zap.Logger
}

Server manages communication with agents. Upon check-in, the server will claim and respond with any tasks available for the agent.

func (Server) WriteAgentMessage

func (srv Server) WriteAgentMessage(ctx context.Context, w transport.ServerMessageWriter, msg transport.AgentMessage) error

WriteAgentMessage is a transport-agnostic method for handling communications from an agent.

type Teamserver

type Teamserver interface {
	ClaimTasks(context.Context, models.ClaimTasksRequest) ([]*ent.Task, error)
	SubmitTaskResult(context.Context, models.SubmitTaskResultRequest) error
}

Teamserver provides client methods used to interact with a teamserver.

Jump to

Keyboard shortcuts

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