github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/actor/v2action/job.go (about)

     1  package v2action
     2  
     3  import (
     4  	"io"
     5  
     6  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv2"
     7  )
     8  
     9  type Job ccv2.Job
    10  
    11  func (actor Actor) PollJob(job Job) (Warnings, error) {
    12  	warnings, err := actor.CloudControllerClient.PollJob(ccv2.Job(job))
    13  	return Warnings(warnings), err
    14  }
    15  
    16  func (actor Actor) UploadApplicationPackage(appGUID string, existingResources []Resource, newResources io.Reader, newResourcesLength int64) (Job, Warnings, error) {
    17  	job, warnings, err := actor.CloudControllerClient.UploadApplicationPackage(appGUID, actor.actorToCCResources(existingResources), newResources, newResourcesLength)
    18  	return Job(job), Warnings(warnings), err
    19  }
    20  
    21  func (actor Actor) UploadDroplet(appGUID string, droplet io.Reader, dropletLength int64) (Job, Warnings, error) {
    22  	job, warnings, err := actor.CloudControllerClient.UploadDroplet(appGUID, droplet, dropletLength)
    23  	return Job(job), Warnings(warnings), err
    24  }