agent

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AgentVersion string = "paragon-v0.1.1"

AgentVersion represents a unique agent version string to identify the agent.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	transport.TaskExecutor
	transport.AgentMessageWriter

	Log         *zap.Logger
	Metadata    transport.AgentMetadata
	MaxIdleTime time.Duration
	// contains filtered or unexported fields
}

Agent provides a standard flow for receiving tasks, writing results, and sending output.

func (*Agent) Run

func (agent *Agent) Run(ctx context.Context)

Run the agent, which will block until the provided context has been canceled.

func (*Agent) WriteServerMessage added in v0.3.0

func (agent *Agent) WriteServerMessage(ctx context.Context, msg transport.ServerMessage)

WriteServerMessage will spawn go routines to execute each task provided by the server.

Directories

Path Synopsis
Package transport defines messages sent between an agent and a server.
Package transport defines messages sent between an agent and a server.

Jump to

Keyboard shortcuts

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