Documentation ¶
Overview ¶
The following code is AUTO-GENERATED. Please DO NOT edit. To update this generated code, run the following command: in the /codegenerator/model subdirectory of this project, making sure that `${GOPATH}/bin` is in your `PATH`:
go install && go generate
This package was generated from the schema defined at /references/worker-manager/v1/api.json This service manages workers, including provisioning for dynamic worker pools.
See:
How to use this package ¶
First create a WorkerManager object:
workerManager := tcworkermanager.New(nil)
and then call one or more of workerManager's methods, e.g.:
err := workerManager.Ping(.....)
handling any errors...
if err != nil { // handle error... }
Taskcluster Schema ¶
The source code of this go package was auto-generated from the API definition at <rootUrl>/references/worker-manager/v1/api.json together with the input and output schemas it references,
Index ¶
- type AwsProviderType
- type AzureProviderType
- type Credentials
- type Credentials1
- type GoogleProviderType
- type ProviderList
- type RegisterWorkerRequest
- type RegisterWorkerResponse
- type ReregisterWorkerRequest
- type ReregisterWorkerResponse
- type StaticProviderType
- type StaticProviderType1
- type Var
- type WorkerCreationRequest
- type WorkerErrorReport
- type WorkerFullDefinition
- type WorkerListInAGivenWorkerPool
- type WorkerManager
- func (workerManager *WorkerManager) CreateWorker(workerPoolId, workerGroup, workerId string, payload *WorkerCreationRequest) (*WorkerFullDefinition, error)
- func (workerManager *WorkerManager) CreateWorkerPool(workerPoolId string, payload *WorkerPoolDefinition) (*WorkerPoolFullDefinition, error)
- func (workerManager *WorkerManager) DeleteWorkerPool(workerPoolId string) (*WorkerPoolFullDefinition, error)
- func (workerManager *WorkerManager) ListProviders(continuationToken, limit string) (*ProviderList, error)
- func (workerManager *WorkerManager) ListWorkerPoolErrors(workerPoolId, continuationToken, limit string) (*WorkerPoolErrorList, error)
- func (workerManager *WorkerManager) ListWorkerPools(continuationToken, limit string) (*WorkerPoolList, error)
- func (workerManager *WorkerManager) ListWorkersForWorkerGroup(workerPoolId, workerGroup, continuationToken, limit string) (*WorkerListInAGivenWorkerPool, error)
- func (workerManager *WorkerManager) ListWorkersForWorkerPool(workerPoolId, continuationToken, limit string) (*WorkerListInAGivenWorkerPool, error)
- func (workerManager *WorkerManager) Ping() error
- func (workerManager *WorkerManager) RegisterWorker(payload *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
- func (workerManager *WorkerManager) RemoveWorker(workerPoolId, workerGroup, workerId string) error
- func (workerManager *WorkerManager) ReportWorkerError(workerPoolId string, payload *WorkerErrorReport) (*WorkerPoolError, error)
- func (workerManager *WorkerManager) ReregisterWorker(payload *ReregisterWorkerRequest) (*ReregisterWorkerResponse, error)
- func (workerManager *WorkerManager) UpdateWorkerPool(workerPoolId string, payload *WorkerPoolDefinition1) (*WorkerPoolFullDefinition, error)
- func (workerManager *WorkerManager) Worker(workerPoolId, workerGroup, workerId string) (*WorkerFullDefinition, error)
- func (workerManager *WorkerManager) WorkerPool(workerPoolId string) (*WorkerPoolFullDefinition, error)
- type WorkerPoolDefinition
- type WorkerPoolDefinition1
- type WorkerPoolError
- type WorkerPoolErrorList
- type WorkerPoolFullDefinition
- type WorkerPoolList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsProviderType ¶
type AwsProviderType struct { // Instance identity document that is obtained by // curl http://169.254.169.254/latest/dynamic/instance-identity/document on the instance Document string `json:"document"` // The signature for instance identity document. Can be obtained by // curl http://169.254.169.254/latest/dynamic/instance-identity/signature on the instance Signature string `json:"signature"` }
Proof that this call is coming from the worker identified by the other fields. The form of this proof varies depending on the provider type.
type AzureProviderType ¶
type AzureProviderType struct { // Attested data document that is obtained by // curl http://169.254.169.254/metadata/attested/document on the instance Document string `json:"document"` }
Proof that this call is coming from the worker identified by the other fields. The form of this proof varies depending on the provider type.
type Credentials ¶
type Credentials struct { AccessToken string `json:"accessToken"` // Note that a certificate may not be provided, if the credentials are not temporary. Certificate string `json:"certificate,omitempty"` ClientID string `json:"clientId"` }
The credentials the worker will need to perform its work. Specifically, credentials with scopes * `assume:worker-pool:<workerPoolId>` * `assume:worker-id:<workerGroup>/<workerId>` * `queue:worker-id:<workerGroup>/<workerId>` * `secrets:get:worker-pool:<workerPoolId>` * `queue:claim-work:<workerPoolId>` * `worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>`
type Credentials1 ¶
type Credentials1 struct { AccessToken string `json:"accessToken"` // Note that a certificate may not be provided, if the credentials are not temporary. Certificate string `json:"certificate,omitempty"` ClientID string `json:"clientId"` }
The credentials the worker will need to perform its work. Specifically, credentials with scopes * `assume:worker-pool:<workerPoolId>` * `assume:worker-id:<workerGroup>/<workerId>` * `queue:worker-id:<workerGroup>/<workerId>` * `secrets:get:worker-pool:<workerPoolId>` * `queue:claim-work:<workerPoolId>` * `worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>` * `worker-manager:reregister-worker:<workerPoolId>/<workerGroup>/<workerId>`
type GoogleProviderType ¶
type GoogleProviderType struct { // A JWT token as defined in [this google documentation](https://cloud.google.com/compute/docs/instances/verifying-instance-identity) Token string `json:"token"` }
Proof that this call is coming from the worker identified by the other fields. The form of this proof varies depending on the provider type.
type ProviderList ¶
type ProviderList struct { // Opaque `continuationToken` to be given as query-string option to get the // next set of workers in the worker-manager. // This property is only present if another request is necessary to fetch all // results. In practice the next request with a `continuationToken` may not // return additional results, but it can. Thus, you can only be sure to have // all the results if you've called `listWorkerPools` with `continuationToken` // until you get a result without a `continuationToken`. ContinuationToken string `json:"continuationToken,omitempty"` // List of all providers Providers []Var `json:"providers"` }
A list of providers
type RegisterWorkerRequest ¶
type RegisterWorkerRequest struct { // The provider that had started the worker and responsible for managing it. // Can be different from the provider that's currently in the worker pool config. // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 ProviderID string `json:"providerId"` // Worker group to which this worker belongs // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerGroup string `json:"workerGroup"` // Worker ID // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerID string `json:"workerId"` // Proof that this call is coming from the worker identified by the other fields. // The form of this proof varies depending on the provider type. // // One of: // * GoogleProviderType // * StaticProviderType1 // * AwsProviderType // * AzureProviderType WorkerIdentityProof json.RawMessage `json:"workerIdentityProof"` // The ID of this worker pool (of the form `providerId/workerType` for compatibility) // // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId"` }
Request body to `registerWorker`.
type RegisterWorkerResponse ¶
type RegisterWorkerResponse struct { // The credentials the worker // will need to perform its work. Specifically, credentials with scopes // * `assume:worker-pool:<workerPoolId>` // * `assume:worker-id:<workerGroup>/<workerId>` // * `queue:worker-id:<workerGroup>/<workerId>` // * `secrets:get:worker-pool:<workerPoolId>` // * `queue:claim-work:<workerPoolId>` // * `worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>` Credentials Credentials `json:"credentials"` // Time at which the included credentials will expire. Workers must either // re-register (for static workers) or terminate (for dynamically // provisioned workers) before this time. Expires tcclient.Time `json:"expires"` // A secret value generated by worker-manager that can be used in the call to `reregisterWorker`. // For more information, refer to https://docs.taskcluster.net/docs/reference/core/worker-manager#reregistration. // // Syntax: ^[a-zA-Z0-9_-]{44}$ Secret string `json:"secret"` // This value is supplied unchanged to the worker from the worker-pool configuration. // The expectation is that the worker will merge this information with configuration from other sources, // and this is precisely what [worker-runner](https://docs.taskcluster.net/docs/reference/workers/worker-runner) does. // This property must not be used for secret configuration, as it is visible both in the worker pool configuration and in the worker instance's metadata. // Instead, put secret configuration in the [secrets service](https://docs.taskcluster.net/docs/reference/workers/worker-runner). // // Additional properties allowed WorkerConfig json.RawMessage `json:"workerConfig"` }
Response body to `registerWorker`.
type ReregisterWorkerRequest ¶
type ReregisterWorkerRequest struct { // The secret value that was last configured in `registerWorker` (in the case of a newly registerd worker) or // `reregisterWorker`. // For more information, refer to https://docs.taskcluster.net/docs/reference/core/worker-manager#reregistration. // // Syntax: ^[a-zA-Z0-9_-]{44}$ Secret string `json:"secret"` // Worker group to which this worker belongs // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerGroup string `json:"workerGroup"` // Worker ID // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerID string `json:"workerId"` // The ID of this worker pool (of the form `providerId/workerType` for compatibility) // // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId"` }
Request body to `reregisterWorker`.
type ReregisterWorkerResponse ¶
type ReregisterWorkerResponse struct { // The credentials the worker // will need to perform its work. Specifically, credentials with scopes // * `assume:worker-pool:<workerPoolId>` // * `assume:worker-id:<workerGroup>/<workerId>` // * `queue:worker-id:<workerGroup>/<workerId>` // * `secrets:get:worker-pool:<workerPoolId>` // * `queue:claim-work:<workerPoolId>` // * `worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>` // * `worker-manager:reregister-worker:<workerPoolId>/<workerGroup>/<workerId>` Credentials Credentials1 `json:"credentials"` // Time at which the included credentials will expire. Workers must // re-register before this time. Expires tcclient.Time `json:"expires"` // The next secret value needed to reregister the worker (in `reregisterWorker). // For more information, refer to https://docs.taskcluster.net/docs/reference/core/worker-manager#reregistration. // // Syntax: ^[a-zA-Z0-9_-]{44}$ Secret string `json:"secret"` }
Response body to `reregisterWorker`.
type StaticProviderType ¶
type StaticProviderType struct { // A secret value shared with the worker. This value must be passed in the `workerIdentityProof` of the `registerWorker` method. // The ideal way to generate a secret of this form is `slugid() + slugid()`. // // Secrets are traded for Taskcluster credentials, and should be treated with similar care. // Each worker should have a distinct secret. // // Syntax: ^[a-zA-Z0-9_-]{44}$ StaticSecret string `json:"staticSecret"` }
Provider-specific information
type StaticProviderType1 ¶
type StaticProviderType1 struct { // The secret value that was configured when the worker was created (in `createWorker`). // // Syntax: ^[a-zA-Z0-9_-]{44}$ StaticSecret string `json:"staticSecret"` }
Proof that this call is coming from the worker identified by the other fields. The form of this proof varies depending on the provider type.
type WorkerCreationRequest ¶
type WorkerCreationRequest struct { // Number of tasks this worker can handle at once // // Mininum: 1 Capacity int64 `json:"capacity,omitempty"` // Date and time when this worker will be deleted from the DB Expires tcclient.Time `json:"expires"` // Provider-specific information // // One of: // * StaticProviderType ProviderInfo json.RawMessage `json:"providerInfo,omitempty"` }
Request to create a worker. Capacity will default to 1 if not specified.
type WorkerErrorReport ¶
type WorkerErrorReport struct { // A longer description of what occured in the error. // // Max length: 10240 Description string `json:"description"` // Any extra structured information about this error // // Additional properties allowed Extra json.RawMessage `json:"extra"` // A general machine-readable way to identify this sort of error. // // Syntax: [-a-z0-9]+ // Max length: 128 Kind string `json:"kind"` // A human-readable version of `kind`. // // Max length: 128 Title string `json:"title"` // Worker group to which this worker belongs // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerGroup string `json:"workerGroup"` // Worker ID // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerID string `json:"workerId"` }
A report of an error from a worker. This will be recorded with kind `worker-error`.
The worker's `workerGroup` and `workerId` will be added to `extra`.
type WorkerFullDefinition ¶
type WorkerFullDefinition struct { // Number of tasks this worker can handle at once // // Mininum: 1 Capacity int64 `json:"capacity"` // Date and time when this worker was created Created tcclient.Time `json:"created"` // Date and time when this worker will be deleted from the DB Expires tcclient.Time `json:"expires"` // Date and time when the state of this worker was verified with a cloud api. // For providers with nothing to check, this will just be permanently set to the // time the worker was created. LastChecked tcclient.Time `json:"lastChecked"` // Date and time when this worker last changed state LastModified tcclient.Time `json:"lastModified"` // The provider that had started the worker and responsible for managing it. // Can be different from the provider that's currently in the worker pool config. // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 ProviderID string `json:"providerId"` // A string specifying the state this worker is in so far as worker-manager knows. // A "requested" worker is in the process of starting up, and if successful will enter // the "running" state once it has registered with the `registerWorker` API method. A // "stopping" worker is in the process of shutting down and deleting resources, while // a "stopped" worker is completely stopped. Stopped workers are kept for historical // purposes and are purged when they expire. Note that some providers transition workers // directly from "running" to "stopped". // // Possible values: // * "requested" // * "running" // * "stopping" // * "stopped" State string `json:"state"` // Worker group to which this worker belongs // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerGroup string `json:"workerGroup"` // Worker ID // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 WorkerID string `json:"workerId"` // The ID of this worker pool (of the form `providerId/workerType` for compatibility) // // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId"` }
A complete worker definition.
type WorkerListInAGivenWorkerPool ¶
type WorkerListInAGivenWorkerPool struct { // Opaque `continuationToken` to be given as query-string option to get the // next set of workers in the worker-manager. // This property is only present if another request is necessary to fetch all // results. In practice the next request with a `continuationToken` may not // return additional results, but it can. Thus, you can only be sure to have // all the results if you've called `listWorkerPools` with `continuationToken` // until you get a result without a `continuationToken`. ContinuationToken string `json:"continuationToken,omitempty"` // List of all workers in a given worker pool Workers []WorkerFullDefinition `json:"workers"` }
A list of workers in a given worker pool
type WorkerManager ¶
func New ¶
func New(credentials *tcclient.Credentials, rootURL string) *WorkerManager
New returns a WorkerManager client, configured to run against production. Pass in nil credentials to create a client without authentication. The returned client is mutable, so returned settings can be altered.
workerManager := tcworkermanager.New( nil, // client without authentication "http://localhost:1234/my/taskcluster", // taskcluster hosted at this root URL on local machine ) err := workerManager.Ping(.....) // for example, call the Ping(.....) API endpoint (described further down)... if err != nil { // handle errors... }
func NewFromEnv ¶
func NewFromEnv() *WorkerManager
NewFromEnv returns a *WorkerManager configured from environment variables.
The root URL is taken from TASKCLUSTER_PROXY_URL if set to a non-empty string, otherwise from TASKCLUSTER_ROOT_URL if set, otherwise the empty string.
The credentials are taken from environment variables:
TASKCLUSTER_CLIENT_ID TASKCLUSTER_ACCESS_TOKEN TASKCLUSTER_CERTIFICATE
If TASKCLUSTER_CLIENT_ID is empty/unset, authentication will be disabled.
func (*WorkerManager) CreateWorker ¶
func (workerManager *WorkerManager) CreateWorker(workerPoolId, workerGroup, workerId string, payload *WorkerCreationRequest) (*WorkerFullDefinition, error)
Create a new worker. The precise behavior of this method depends on the provider implementing the given worker pool. Some providers do not support creating workers at all, and will return a 400 error.
Required scopes:
worker-manager:create-worker:<workerPoolId>/<workerGroup>/<workerId>
See #createWorker
func (*WorkerManager) CreateWorkerPool ¶
func (workerManager *WorkerManager) CreateWorkerPool(workerPoolId string, payload *WorkerPoolDefinition) (*WorkerPoolFullDefinition, error)
Create a new worker pool. If the worker pool already exists, this will throw an error.
Required scopes:
All of: * worker-manager:manage-worker-pool:<workerPoolId> * worker-manager:provider:<providerId>
See #createWorkerPool
func (*WorkerManager) DeleteWorkerPool ¶
func (workerManager *WorkerManager) DeleteWorkerPool(workerPoolId string) (*WorkerPoolFullDefinition, error)
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`.
Required scopes:
worker-manager:manage-worker-pool:<workerPoolId>
See #deleteWorkerPool
func (*WorkerManager) ListProviders ¶
func (workerManager *WorkerManager) ListProviders(continuationToken, limit string) (*ProviderList, error)
Retrieve a list of providers that are available for worker pools.
See #listProviders
func (*WorkerManager) ListWorkerPoolErrors ¶
func (workerManager *WorkerManager) ListWorkerPoolErrors(workerPoolId, continuationToken, limit string) (*WorkerPoolErrorList, error)
Get the list of worker pool errors.
See #listWorkerPoolErrors
func (*WorkerManager) ListWorkerPools ¶
func (workerManager *WorkerManager) ListWorkerPools(continuationToken, limit string) (*WorkerPoolList, error)
Get the list of all the existing worker pools.
See #listWorkerPools
func (*WorkerManager) ListWorkersForWorkerGroup ¶
func (workerManager *WorkerManager) ListWorkersForWorkerGroup(workerPoolId, workerGroup, continuationToken, limit string) (*WorkerListInAGivenWorkerPool, error)
Get the list of all the existing workers in a given group in a given worker pool.
See #listWorkersForWorkerGroup
func (*WorkerManager) ListWorkersForWorkerPool ¶
func (workerManager *WorkerManager) ListWorkersForWorkerPool(workerPoolId, continuationToken, limit string) (*WorkerListInAGivenWorkerPool, error)
Get the list of all the existing workers in a given worker pool.
See #listWorkersForWorkerPool
func (*WorkerManager) Ping ¶
func (workerManager *WorkerManager) Ping() error
Respond without doing anything. This endpoint is used to check that the service is up.
See #ping
func (*WorkerManager) RegisterWorker ¶
func (workerManager *WorkerManager) RegisterWorker(payload *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
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.
See #registerWorker
func (*WorkerManager) RemoveWorker ¶
func (workerManager *WorkerManager) RemoveWorker(workerPoolId, workerGroup, workerId string) error
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.
Required scopes:
worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>
See #removeWorker
func (*WorkerManager) ReportWorkerError ¶
func (workerManager *WorkerManager) ReportWorkerError(workerPoolId string, payload *WorkerErrorReport) (*WorkerPoolError, error)
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.
Required scopes:
All of: * assume:worker-pool:<workerPoolId> * assume:worker-id:<workerGroup>/<workerId>
See #reportWorkerError
func (*WorkerManager) ReregisterWorker ¶
func (workerManager *WorkerManager) ReregisterWorker(payload *ReregisterWorkerRequest) (*ReregisterWorkerResponse, error)
Stability: *** EXPERIMENTAL ***
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.
Required scopes:
worker-manager:reregister-worker:<workerPoolId>/<workerGroup>/<workerId>
See #reregisterWorker
func (*WorkerManager) UpdateWorkerPool ¶
func (workerManager *WorkerManager) UpdateWorkerPool(workerPoolId string, payload *WorkerPoolDefinition1) (*WorkerPoolFullDefinition, error)
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.
Required scopes:
All of: * worker-manager:manage-worker-pool:<workerPoolId> * worker-manager:provider:<providerId>
See #updateWorkerPool
func (*WorkerManager) Worker ¶
func (workerManager *WorkerManager) Worker(workerPoolId, workerGroup, workerId string) (*WorkerFullDefinition, error)
Get a single worker.
See #worker
func (*WorkerManager) WorkerPool ¶
func (workerManager *WorkerManager) WorkerPool(workerPoolId string) (*WorkerPoolFullDefinition, error)
Fetch an existing worker pool defition.
See #workerPool
type WorkerPoolDefinition ¶
type WorkerPoolDefinition struct { // Additional properties allowed Config json.RawMessage `json:"config"` // A description of this worker pool. // // Max length: 10240 Description string `json:"description"` // If true, the owner should be emailed on provisioning errors EmailOnError bool `json:"emailOnError"` // An email address to notify when there are provisioning errors for this // worker pool. Owner string `json:"owner"` // The provider responsible for managing this worker pool. // // If this value is `"null-provider"`, then the worker pool is pending deletion // once all existing workers have terminated. // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 ProviderID string `json:"providerId"` }
Fields that are defined by a user for a worker pool. Used to create worker-pool definitions. There is a larger set of fields for viewing since some parts are generated by the service.
type WorkerPoolDefinition1 ¶
type WorkerPoolDefinition1 struct { // Additional properties allowed Config json.RawMessage `json:"config"` // Ignored on update Created tcclient.Time `json:"created,omitempty"` // A description of this worker pool. // // Max length: 10240 Description string `json:"description"` // If true, the owner should be emailed on provisioning errors EmailOnError bool `json:"emailOnError"` // Ignored on update LastModified tcclient.Time `json:"lastModified,omitempty"` // An email address to notify when there are provisioning errors for this // worker pool. Owner string `json:"owner"` // The provider responsible for managing this worker pool. // // If this value is `"null-provider"`, then the worker pool is pending deletion // once all existing workers have terminated. // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 ProviderID string `json:"providerId"` // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId,omitempty"` }
Fields that are defined by a user for a worker pool. Used to modify worker-pool definitions.
The `workerPoolId`, `created`, and `lastModified` fields are optional and allowed only to ease the common practice of getting a worker pool definition with `workerPool(..)`, modifying it, and writing it back with `updateWorkerPool(..). `workerPoolId` must be correct if supplied, and the values of `created` and `lastModified` are ignored.
type WorkerPoolError ¶
type WorkerPoolError struct { // A longer description of what occured in the error. // // Max length: 10240 Description string `json:"description"` // An arbitary unique identifier for this error // // Syntax: ^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$ ErrorID string `json:"errorId"` // Any extra structured information about this error // // Additional properties allowed Extra json.RawMessage `json:"extra"` // A general machine-readable way to identify this sort of error. // // Syntax: [-a-z0-9]+ // Max length: 128 Kind string `json:"kind"` // Date and time when this error was reported Reported tcclient.Time `json:"reported"` // A human-readable version of `kind`. // // Max length: 128 Title string `json:"title"` // The ID of this worker pool (of the form `providerId/workerType` for compatibility) // // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId"` }
A complete worker pool error definition.
type WorkerPoolErrorList ¶
type WorkerPoolErrorList struct { // Opaque `continuationToken` to be given as query-string option to get the // next set of worker-types in the worker-manager. // This property is only present if another request is necessary to fetch all // results. In practice the next request with a `continuationToken` may not // return additional results, but it can. Thus, you can only be sure to have // all the results if you've called `listWorkerPools` with `continuationToken` // until you get a result without a `continuationToken`. ContinuationToken string `json:"continuationToken,omitempty"` // List of worker pool errors WorkerPoolErrors []WorkerPoolError `json:"workerPoolErrors"` }
A list of worker pool errors
type WorkerPoolFullDefinition ¶
type WorkerPoolFullDefinition struct { // Additional properties allowed Config json.RawMessage `json:"config"` // Date and time when this worker pool was created Created tcclient.Time `json:"created"` // Total capacity available across all workers for this worker pool that are currently not "stopped" // // Mininum: 0 CurrentCapacity int64 `json:"currentCapacity"` // A description of this worker pool. // // Max length: 10240 Description string `json:"description"` // If true, the owner should be emailed on provisioning errors EmailOnError bool `json:"emailOnError"` // Date and time when this worker pool was last updated LastModified tcclient.Time `json:"lastModified"` // An email address to notify when there are provisioning errors for this // worker pool. Owner string `json:"owner"` // The provider responsible for managing this worker pool. // // If this value is `"null-provider"`, then the worker pool is pending deletion // once all existing workers have terminated. // // Syntax: ^([a-zA-Z0-9-_]*)$ // Min length: 1 // Max length: 38 ProviderID string `json:"providerId"` // The ID of this worker pool (of the form `providerId/workerType` for compatibility) // // Syntax: ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$ WorkerPoolID string `json:"workerPoolId,omitempty"` }
A complete worker pool definition.
type WorkerPoolList ¶
type WorkerPoolList struct { // Opaque `continuationToken` to be given as query-string option to get the // next set of worker-types in the worker-manager. // This property is only present if another request is necessary to fetch all // results. In practice the next request with a `continuationToken` may not // return additional results, but it can. Thus, you can only be sure to have // all the results if you've called `listWorkerPools` with `continuationToken` // until you get a result without a `continuationToken`. ContinuationToken string `json:"continuationToken,omitempty"` // List of all worker pools WorkerPools []WorkerPoolFullDefinition `json:"workerPools"` }
A list of worker pools