Struct taskcluster::WorkerManager[][src]

pub struct WorkerManager(_);

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.

Implementations

impl WorkerManager[src]

pub fn new<CB: Into<ClientBuilder>>(client_builder: CB) -> Result<Self, Error>[src]

Create a new undefined instance, based on the given client.

pub async fn ping(&self) -> Result<(), Error>[src]

Ping Server

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

pub fn ping_url(&self) -> Result<String, Error>[src]

Generate an unsigned URL for the ping endpoint

pub fn ping_signed_url(&self, ttl: Duration) -> Result<String, Error>[src]

Generate a signed URL for the ping endpoint

pub async fn listProviders(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<Value, Error>
[src]

List Providers

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

pub fn listProviders_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the listProviders endpoint

pub fn listProviders_signed_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the listProviders endpoint

pub async fn createWorkerPool(
    &self,
    workerPoolId: &str,
    payload: &Value
) -> Result<Value, Error>
[src]

Create Worker Pool

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

pub async fn updateWorkerPool(
    &self,
    workerPoolId: &str,
    payload: &Value
) -> Result<Value, Error>
[src]

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.

pub async fn deleteWorkerPool(&self, workerPoolId: &str) -> Result<Value, Error>[src]

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.

pub async fn workerPool(&self, workerPoolId: &str) -> Result<Value, Error>[src]

Get Worker Pool

Fetch an existing worker pool defition.

pub fn workerPool_url(&self, workerPoolId: &str) -> Result<String, Error>[src]

Generate an unsigned URL for the workerPool endpoint

pub fn workerPool_signed_url(
    &self,
    workerPoolId: &str,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the workerPool endpoint

pub async fn listWorkerPools(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<Value, Error>
[src]

List All Worker Pools

Get the list of all the existing worker pools.

pub fn listWorkerPools_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the listWorkerPools endpoint

pub fn listWorkerPools_signed_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the listWorkerPools endpoint

pub async fn reportWorkerError(
    &self,
    workerPoolId: &str,
    payload: &Value
) -> Result<Value, Error>
[src]

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.

pub async fn listWorkerPoolErrors(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<Value, Error>
[src]

List Worker Pool Errors

Get the list of worker pool errors.

pub fn listWorkerPoolErrors_url(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the listWorkerPoolErrors endpoint

pub fn listWorkerPoolErrors_signed_url(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the listWorkerPoolErrors endpoint

pub async fn listWorkersForWorkerGroup(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<Value, Error>
[src]

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.

pub fn listWorkersForWorkerGroup_url(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the listWorkersForWorkerGroup endpoint

pub fn listWorkersForWorkerGroup_signed_url(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the listWorkersForWorkerGroup endpoint

pub async fn worker(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str
) -> Result<Value, Error>
[src]

Get a Worker

Get a single worker.

pub fn worker_url(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str
) -> Result<String, Error>
[src]

Generate an unsigned URL for the worker endpoint

pub fn worker_signed_url(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the worker endpoint

pub async fn createWorker(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str,
    payload: &Value
) -> Result<Value, Error>
[src]

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.

pub async fn updateWorker(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str,
    payload: &Value
) -> Result<Value, Error>
[src]

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.

pub async fn removeWorker(
    &self,
    workerPoolId: &str,
    workerGroup: &str,
    workerId: &str
) -> Result<(), Error>
[src]

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.

pub async fn listWorkersForWorkerPool(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<Value, Error>
[src]

Workers in a Worker Pool

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

pub fn listWorkersForWorkerPool_url(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the listWorkersForWorkerPool endpoint

pub fn listWorkersForWorkerPool_signed_url(
    &self,
    workerPoolId: &str,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the listWorkersForWorkerPool endpoint

pub async fn registerWorker(&self, payload: &Value) -> Result<Value, Error>[src]

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.

pub async fn reregisterWorker(&self, payload: &Value) -> Result<Value, Error>[src]

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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.