pub struct WorkerManager {
    pub client: Client,
}
Expand description

Worker Manager Service

This service manages workers, including provisioning for dynamic worker pools.

Methods interacting with a provider may return a 503 response if that provider has not been able to start up, such as if the service to which it interfaces has an outage. Such requests can be retried as for any other 5xx response.

Fields

client: Client

The underlying client used to make API calls for this service.

Implementations

Create a new WorkerManager instance, based on the given client builder

Ping Server

Respond without doing anything. This endpoint is used to check that the service is up.

Generate an unsigned URL for the ping endpoint

Generate a signed URL for the ping endpoint

Load Balancer Heartbeat

Respond without doing anything. This endpoint is used to check that the service is up.

Generate an unsigned URL for the lbheartbeat endpoint

Generate a signed URL for the lbheartbeat endpoint

Taskcluster Version

Respond with the JSON version object. https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md

Generate an unsigned URL for the version endpoint

Generate a signed URL for the version endpoint

List Providers

Retrieve a list of providers that are available for worker pools.

Generate an unsigned URL for the listProviders endpoint

Generate a signed URL for the listProviders endpoint

Create Worker Pool

Create a new worker pool. If the worker pool already exists, this will throw an error.

Update Worker Pool

Given an existing worker pool definition, this will modify it and return the new definition.

To delete a worker pool, set its providerId to "null-provider". After any existing workers have exited, a cleanup job will remove the worker pool. During that time, the worker pool can be updated again, such as to set its providerId to a real provider.

Delete Worker Pool

Mark a worker pool for deletion. This is the same as updating the pool to set its providerId to "null-provider", but does not require scope worker-manager:provider:null-provider.

Get Worker Pool

Fetch an existing worker pool defition.

Generate an unsigned URL for the workerPool endpoint

Generate a signed URL for the workerPool endpoint

List All Worker Pools

Get the list of all the existing worker pools.

Generate an unsigned URL for the listWorkerPools endpoint

Generate a signed URL for the listWorkerPools endpoint

Report an error from a worker

Report an error that occurred on a worker. This error will be included with the other errors in listWorkerPoolErrors(workerPoolId).

Workers can use this endpoint to report startup or configuration errors that might be associated with the worker pool configuration and thus of interest to a worker-pool administrator.

NOTE: errors are publicly visible. Ensure that none of the content contains secrets or other sensitive information.

List Worker Pool Errors

Get the list of worker pool errors.

Generate an unsigned URL for the listWorkerPoolErrors endpoint

Generate a signed URL for the listWorkerPoolErrors endpoint

Workers in a specific Worker Group in a Worker Pool

Get the list of all the existing workers in a given group in a given worker pool.

Generate an unsigned URL for the listWorkersForWorkerGroup endpoint

Generate a signed URL for the listWorkersForWorkerGroup endpoint

Get a Worker

Get a single worker.

Generate an unsigned URL for the worker endpoint

Generate a signed URL for the worker endpoint

Create a Worker

Create a new worker. This is only useful for worker pools where the provider does not create workers automatically, such as those with a static provider type. Providers that do not support creating workers will return a 400 error. See the documentation for the individual providers, and in particular the static provider for more information.

Update an existing Worker

Update an existing worker in-place. Like createWorker, this is only useful for worker pools where the provider does not create workers automatically. This method allows updating all fields in the schema unless otherwise indicated in the provider documentation. See the documentation for the individual providers, and in particular the static provider for more information.

Remove a Worker

Remove an existing worker. The precise behavior of this method depends on the provider implementing the given worker. Some providers do not support removing workers at all, and will return a 400 error. Others may begin removing the worker, but it may remain available via the API (perhaps even in state RUNNING) afterward.

Workers in a Worker Pool

Get the list of all the existing workers in a given worker pool.

Generate an unsigned URL for the listWorkersForWorkerPool endpoint

Generate a signed URL for the listWorkersForWorkerPool endpoint

Register a running worker

Register a running worker. Workers call this method on worker start-up.

This call both marks the worker as running and returns the credentials the worker will require to perform its work. The worker must provide some proof of its identity, and that proof varies by provider type.

Reregister a Worker

Reregister a running worker.

This will generate and return new Taskcluster credentials for the worker on that instance to use. The credentials will not live longer the registrationTimeout for that worker. The endpoint will update terminateAfter for the worker so that worker-manager does not terminate the instance.

Heartbeat

Respond with a service heartbeat.

This endpoint is used to check on backing services this service depends on.

Generate an unsigned URL for the heartbeat endpoint

Generate a signed URL for the heartbeat endpoint

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more