agent

package
v0.2.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

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