taskrunner

package
v0.0.0-...-eeee692 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MakeShellTimeout  = 2 * time.Minute
	SCPTimeout        = 3 * time.Minute
	StartAgentTimeout = 2 * time.Minute
)
View Source
const (
	RunnerName  = "taskrunner"
	Description = "dispatch agents to free hosts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentHostGateway

type AgentHostGateway struct {
	// Destination directory for the agent executables
	ExecutablesDir string
}

Implementation of the HostGateway that builds and copies over the MCI agent to run tasks.

func (*AgentHostGateway) GetAgentRevision

func (agbh *AgentHostGateway) GetAgentRevision() (string, error)

Gets the git revision of the currently built agent

func (*AgentHostGateway) StartAgentOnHost

func (agbh *AgentHostGateway) StartAgentOnHost(settings *evergreen.Settings, hostObj host.Host) error

Start the task specified, on the host specified. First runs any necessary preparation on the remote machine, then kicks off the agent process on the machine. Returns an error if any step along the way fails.

type HostGateway

type HostGateway interface {
	// run the specified task on the specified host, return the revision of the
	// agent running the task on that host
	StartAgentOnHost(*evergreen.Settings, host.Host) error
	// gets the current revision of the agent
	GetAgentRevision() (string, error)
}

HostGateway is responsible for kicking off tasks on remote machines.

type Runner

type Runner struct{}

func (*Runner) Description

func (r *Runner) Description() string

func (*Runner) Name

func (r *Runner) Name() string

func (*Runner) Run

func (r *Runner) Run(config *evergreen.Settings) error

type TaskRunner

type TaskRunner struct {
	*evergreen.Settings
	HostGateway
}

TODO: take out task queue finder and host finder once transition is complete

func NewTaskRunner

func NewTaskRunner(settings *evergreen.Settings) *TaskRunner

func (*TaskRunner) Run

func (tr *TaskRunner) Run() error

Jump to

Keyboard shortcuts

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