provider

package
v26.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWorker

func RegisterWorker(state *run.State, wm tc.WorkerManager, workerPoolID, providerID, workerGroup, workerID string, workerIdentityProofMap map[string]interface{}) (*json.RawMessage, error)

Register this worker with the worker-manager, and update the state with the parameters and the results.

Types

type Provider

type Provider interface {
	// Configure the given state.  This is expected to set the Taskcluster deployment
	// and worker-information fields, but may modify any part of the state it desires.
	ConfigureRun(state *run.State) error

	// In a subsequent run with cacheOverRestarts set, this method is called
	// instead of ConfigureRun.  It should recover any provider state required
	// from the given Run.
	UseCachedRun(run *run.State) error

	// Set the protocol used for communication with this worker.  This is an appropriate
	// time to register for interesting messages from the worker.
	SetProtocol(proto *protocol.Protocol)

	// The worker has started.  This is an appropriate time to set up any
	// provider-specific things that should occur while the worker is running.
	// Note that this is called before the protocol has started, so it will still
	// have no capabilities.
	WorkerStarted() error

	// The worker has exited.  Handle any necessary communication with the provider.
	// Note that this method may not always be called, e.g., in the event of a system
	// failure.
	WorkerFinished() error
}

Provider is responsible for determining the identity of this worker and gathering Takcluster credentials.

Jump to

Keyboard shortcuts

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