Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type State ¶
type State struct {
sync.RWMutex
// Information about the Taskcluster deployment where this
// worker is running
RootURL string
// Credentials for the worker, and their expiration time. Shortly before
// this expiration, worker-runner will try to gracefully stop the worker
Credentials taskcluster.Credentials
CredentialsExpire taskcluster.Time `yaml:",omitempty"`
RegistrationSecret string
// Information about this worker
WorkerPoolID string
WorkerGroup string
WorkerID string
ProviderID string
// metadata from the provider (useful to display to the user for
// debugging).
//
// Docker-worker currently expects the following properties:
//
// * public-hostname
// * public-ipv4
// * local-ipv4
// * instance-type
// * instance-id
// * region
//
// It doesn't, strictly speaking, require these fields,
// but may fall onto undesirable defaults if these are not provided
// A bit more info on that here
// https://github.com/taskcluster/taskcluster-worker-runner/pull/30#pullrequestreview-277378260
ProviderMetadata map[string]interface{}
// the accumulated WorkerConfig for this run, including files to create
WorkerConfig *cfg.WorkerConfig
Files []files.File
// The worker location configuration
WorkerLocation map[string]string
}
State represents the state of the worker run. Its contents are built up bit-by-bit during the start-worker process. Access to all fields is gated by the mutex.
func (*State) CheckProviderResults ¶
Check that the provided provided the information it was supposed to.
func (*State) WriteCacheFile ¶
Write the state to the given cache file, checking permissions along the way
Click to show internal directories.
Click to hide internal directories.