jobs

package
v0.0.0-...-d823fe1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorInfo

type ErrorInfo struct {
	Message string `json:"message"`
	Code    string `json:"code"`
}

ErrorInfo contains the error message returned when an error occurs

type GetResult

type GetResult struct {
	golangsdk.Result
}

GetResult contains the response body and error from a Get request

func GetJobDetails

func GetJobDetails(client *golangsdk.ServiceClient, jobID string) (r GetResult)

GetJobDetails retrieves the Job with the provided jobID. To extract the Job object from the response, call the ExtractJob method on the GetResult.

func (GetResult) ExtractJob

func (r GetResult) ExtractJob() (*Job, error)

ExtractJob will get the *Job object out of the GetResult

type Job

type Job struct {
	Status     string    `json:"status"`
	Entities   JobEntity `json:"entities"`
	JobID      string    `json:"job_id"`
	JobType    string    `json:"job_type"`
	ErrorCode  string    `json:"error_code"`
	FailReason string    `json:"fail_reason"`
	Error      ErrorInfo `json:"error"`
	BeginTime  string    `json:"begin_time"`
	EndTime    string    `json:"end_time"`
}

Job object contains the response to a Get request

type JobEntity

type JobEntity struct {
	Name       string `json:"name"`
	Size       int    `json:"size"`
	VolumeID   string `json:"volume_id"`
	VolumeType string `json:"volume_type"`
	SubJobs    []Job  `json:"sub_jobs"`
}

JobEntity contains the response to the job task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL