(jobURL ccv3.JobURL)
| 26 | } |
| 27 | |
| 28 | func (actor Actor) PollJobToEventStream(jobURL ccv3.JobURL) chan PollJobEvent { |
| 29 | input := actor.CloudControllerClient.PollJobToEventStream(jobURL) |
| 30 | if input == nil { |
| 31 | return nil |
| 32 | } |
| 33 | |
| 34 | output := make(chan PollJobEvent) |
| 35 | |
| 36 | go func() { |
| 37 | for event := range input { |
| 38 | output <- PollJobEvent{ |
| 39 | State: JobState(event.State), |
| 40 | Err: event.Err, |
| 41 | Warnings: Warnings(event.Warnings), |
| 42 | } |
| 43 | } |
| 44 | close(output) |
| 45 | }() |
| 46 | |
| 47 | return output |
| 48 | } |
no test coverage detected