worker

package
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: 4 Imported by: 0

Documentation

Overview

Package worker implements a constructor for skylab_swarming_worker commands. This package is intended to be used by package that need to construct a command line for running skylab_swarming_worker.

Index

Constants

View Source
const DefaultPath = "/opt/infra-tools/skylab_swarming_worker"

DefaultPath is the default path for skylab_swarming_worker.

Variables

This section is empty.

Functions

func GenerateLogDogURL

func GenerateLogDogURL(e Environment) string

GenerateLogDogURL generates a LogDog annotation URL that is suitable for a worker command.

Types

type Command

type Command struct {
	Actions    string
	ClientTest bool
	Deadline   time.Time
	Keyvals    map[string]string
	// LogDogAnnotationURL can be set automatically with Env.
	LogDogAnnotationURL string
	// If true, pass the magic var ${ISOLATED_OUTDIR} to the worker.
	OutputToIsolate bool
	// Path to skylab_swarming_worker.  The default is DefaultPath.
	Path            string
	ProvisionLabels []string
	// TaskName is required.
	TaskName string
	TestArgs string
}

Command is a constructor for skylab_swarming_worker commands.

func (*Command) Args

func (c *Command) Args() []string

Args returns the arg strings for running the command.

func (*Command) Config

func (c *Command) Config(e Environment)

Config configures the command with the given options.

type Environment

type Environment interface {
	LUCIProject() string
	LogDogHost() string
	GenerateLogPrefix() string
}

Environment defines a Skylab environment (e.g., dev vs prod) for configuring a worker command.

Jump to

Keyboard shortcuts

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