agent

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadBuiltins

func LoadBuiltins(syncReq chan struct{}) chan types.PluginUpdateResponse

Types

type Agent

type Agent struct {
	SpecManager *SpecsManager
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (Agent, context.Context, error)

New returns a new Client and an initialized context containing values like agent_id.

While the agent is the client from GRPC perspective, it is the server from application perspective, i.e. the manager (GRPC server) send request to the agent (GRPC client) via a bidi GRPC stream.

func (*Agent) AgentPlugins

func (a *Agent) AgentPlugins(ctx context.Context) (map[string]string, error)

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) Connect

func (a *Agent) Connect(ctx context.Context) error

func (*Agent) Handshake

func (a *Agent) Handshake(ctx context.Context) error

func (*Agent) KeepPluginsUpToDate

func (a *Agent) KeepPluginsUpToDate(ctxMetadata context.Context, specsSync chan struct{})

func (*Agent) KillPlugins

func (a *Agent) KillPlugins()

func (*Agent) ListenTaskRequest

func (a *Agent) ListenTaskRequest(ctx context.Context) error

type Config

type Config struct {
	ManagerAddress     string
	ManagerPort        string
	AgentID            string
	MTLSEnabled        bool
	MTLSCert           string
	MTLSKey            string
	MTLSManagerCA      string
	PluginDir          string
	PluginServerPort   string
	CustomResolvers    []string
	MaxConcurrentTasks int
	MaxWaitingRequests int
}

Config holds the configuration for creating a new Agent.

type ID

type ID string

type SpecsManager

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

func NewSpecsManager

func NewSpecsManager() (*SpecsManager, error)

func (*SpecsManager) All

func (s *SpecsManager) All() (map[string]any, error)

func (*SpecsManager) Get

func (s *SpecsManager) Get(spec string) (any, error)

func (*SpecsManager) List

func (s *SpecsManager) List() ([]string, error)

func (*SpecsManager) StartSpecCollector

func (s *SpecsManager) StartSpecCollector(ctx context.Context, syncReq chan struct{})

Jump to

Keyboard shortcuts

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