agent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShuttingDown = fmt.Errorf("runner is being terminated")

Functions

func IsErrorOfInterest

func IsErrorOfInterest(err error) bool

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(ctx context.Context, conn *websocket.Conn, instance params.Instance, store runner.AgentStoreOps) (*Agent, error)

func (*Agent) CreateShellSession

func (a *Agent) CreateShellSession(ctx context.Context, sessionID uuid.UUID, clientConn *websocket.Conn) (*ClientSession, error)

func (*Agent) Done

func (a *Agent) Done() <-chan struct{}

func (*Agent) IsRunning

func (a *Agent) IsRunning() bool

func (*Agent) RemoveClientSession

func (a *Agent) RemoveClientSession(sessionID uuid.UUID, safe bool) error

func (*Agent) Start

func (a *Agent) Start() error

func (*Agent) Stop

func (a *Agent) Stop() error

type ClientSession

type ClientSession struct {
	// contains filtered or unexported fields
}

func NewClientSession

func NewClientSession(ctx context.Context, clientConn *websocket.Conn, agentWriter writeMessage, sessionID uuid.UUID) (*ClientSession, error)

func (*ClientSession) Done

func (c *ClientSession) Done() chan struct{}

func (*ClientSession) Start

func (c *ClientSession) Start() error

func (*ClientSession) Stop

func (c *ClientSession) Stop() error

func (*ClientSession) Write

func (c *ClientSession) Write(msg []byte) error

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(ctx context.Context) (*Hub, error)

func (*Hub) GetAgent

func (a *Hub) GetAgent(agentID string) (*Agent, error)

func (*Hub) RegisterAgent

func (a *Hub) RegisterAgent(agent *Agent) error

func (*Hub) Start

func (a *Hub) Start() error

func (*Hub) Stop

func (a *Hub) Stop() error

func (*Hub) UnregisterAgent

func (a *Hub) UnregisterAgent(agentID string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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