agent

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 14 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
	// SwarmingURL is the URL of the Swarming instance.  Should be
	// a full URL without the path, e.g. https://host.example.com
	SwarmingURL string
	// 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 bots.
	// 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
	// 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.

Source Files

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