MCPcopy Index your code
hub / github.com/cloudfoundry/cli / GetJob

Method GetJob

api/cloudcontroller/ccv3/job.go:79–92  ·  view source on GitHub ↗

GetJob returns a job for the provided GUID.

(jobURL JobURL)

Source from the content-addressed store, hash-verified

77
78// GetJob returns a job for the provided GUID.
79func (client *Client) GetJob(jobURL JobURL) (Job, Warnings, error) {
80 var responseBody Job
81
82 _, warnings, err := client.MakeRequest(RequestParams{
83 URL: string(jobURL),
84 ResponseBody: &responseBody,
85 })
86
87 for _, jobWarning := range responseBody.Warnings {
88 warnings = append(warnings, jobWarning.Detail)
89 }
90
91 return responseBody, warnings, err
92}
93
94// PollJob will keep polling the given job until the job has terminated, an
95// error is encountered, or config.OverallPollingTimeout is reached. In the

Callers 3

PollJobForStateMethod · 0.95
PollJobToEventStreamMethod · 0.95
job_test.goFile · 0.80

Calls 1

MakeRequestMethod · 0.65

Tested by

no test coverage detected