agent

package
v0.0.0-...-9994f1b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package agent implements an agent which talks to a drone queen service and manages Swarming bots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Client api.DroneClient
	// WorkingDir is used for Swarming bot working dirs.  It is
	// the caller's responsibility to create this.
	WorkingDir        string
	ReportingInterval time.Duration
	DUTCapacity       int
	// StartBotFunc is used to start Swarming bot processes.
	// This must be set.
	StartBotFunc func(bot.Config) (bot.Bot, error)
	// Hive value of the drone agent.  This is used for DUT/drone affinity.
	// A drone is assigned DUTs with same hive value.
	Hive string
	// BotPrefix is used to prefix hostnames for bots.
	BotPrefix string
	// BotResources is the compute resources (CPU, RAM, disk I/O etc.) assigned
	// to each bot.
	BotResources *specs.LinuxResources

	// Python version used for swarming bot
	PythonVersion string
	// contains filtered or unexported fields
}

Agent talks to a drone queen service and manages Swarming bots. This struct stores the static configuration for the agent. The dynamic state is stored in state.State.

func (*Agent) Run

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

Run runs the agent until it is canceled via the context.

Directories

Path Synopsis
Package state implements the agent state.
Package state implements the agent state.

Jump to

Keyboard shortcuts

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