Documentation ¶
Overview ¶
Package progress implements API functions residing under /provisioning/progress. This path contains methods for querying the status of VM provisioning tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProgress = errors.New("progress response contains errors")
ErrProgress is raised if a poll request completes but the result contains errors.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { AwaitCompletion(ctx context.Context, progressID string) (string, error) Get(ctx context.Context, identifier string) (Progress, error) }
API contains methods for progress inquiries.
type Progress ¶
type Progress struct { // TaskIdentifier is the identifier of the provisioning task. TaskIdentifier string `json:"identifier"` // Queued indicated that the task is waiting to be started- Queued bool `json:"queued"` // Progress is the provisioning progress in percent (queuing not included). Progress int `json:"progress"` // VMIdentifier of the new VM. VMIdentifier string `json:"vm_identifier"` // Errors encountered while provisioning. Errors []string `json:"errors"` }
Progress contains information regarding the provisioning of a VM returned by the API .
Click to show internal directories.
Click to hide internal directories.