Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobEntity ¶
type JobEntity struct {
// Specifies the number of subtasks.
// When no subtask exists, the value of this parameter is 0.
SubJobsTotal int `json:"sub_jobs_total"`
// Specifies the execution information of a subtask.
// When no subtask exists, the value of this parameter is left blank.
SubJobs []SubJob `json:"sub_jobs"`
}
type JobExecResult ¶
type JobExecResult struct {
// contains filtered or unexported fields
}
JobExecResult represents the result of a get operation. Call its ExtractJobResult method to interpret it as a jobresult.
func (JobExecResult) ExtractJobResult ¶
ExtractJobResult is a function that accepts a result and extracts a jobresult.
type JobResult ¶
type JobResult struct {
// Specifies the task ID.
Id string `json:"job_id"`
// Specifies the task type.
Type string `json:"job_type"`
//Specifies the task status.
// SUCCESS: indicates the task is successfully executed.
// RUNNING: indicates that the task is in progress.
// FAIL: indicates that the task failed.
// INIT: indicates that the task is being initialized.
Status string `json:"status"`
// Specifies the time when the task started.
BeginTime string `json:"begin_time"`
// Specifies the time when the task finished.
EndTime string `json:"end_time"`
// Specifies the returned error code when the task execution fails.
ErrorCode string `json:"error_code"`
// Specifies the cause of the task execution failure.
FailReason string `json:"fail_reason"`
// Specifies the object of the task.
Entities JobEntity `json:"entities"`
}
func GetJobResult ¶
func GetJobResult(client *gophercloud.ServiceClient, id string) (JobResult, error)
Querying the task status based on its job ID.
type SubJob ¶
type SubJob struct {
// Specifies the task ID.
Id string `json:"job_id"`
// Task type.
Type string `json:"job_type"`
//Specifies the task status.
// SUCCESS: indicates the task is successfully executed.
// RUNNING: indicates that the task is in progress.
// FAIL: indicates that the task failed.
// INIT: indicates that the task is being initialized.
Status string `json:"status"`
// Specifies the time when the task started.
BeginTime string `json:"begin_time"`
// Specifies the time when the task finished.
EndTime string `json:"end_time"`
// Specifies the returned error code when the task execution fails.
ErrorCode string `json:"error_code"`
// Specifies the cause of the task execution failure.
FailReason string `json:"fail_reason"`
// Specifies the object of the task.
Entities *SubJobEntity `json:"entities"`
}
type SubJobEntity ¶
Click to show internal directories.
Click to hide internal directories.