GetProcessByTypeAndApplication returns a process for the given application and type.
(processType string, appGUID string)
| 16 | // GetProcessByTypeAndApplication returns a process for the given application |
| 17 | // and type. |
| 18 | func (actor Actor) GetProcessByTypeAndApplication(processType string, appGUID string) (resources.Process, Warnings, error) { |
| 19 | process, warnings, err := actor.CloudControllerClient.GetApplicationProcessByType(appGUID, processType) |
| 20 | if _, ok := err.(ccerror.ProcessNotFoundError); ok { |
| 21 | return resources.Process{}, Warnings(warnings), actionerror.ProcessNotFoundError{ProcessType: processType} |
| 22 | } |
| 23 | return resources.Process(process), Warnings(warnings), err |
| 24 | } |
| 25 | |
| 26 | func (actor Actor) ScaleProcessByApplication(appGUID string, process resources.Process) (Warnings, error) { |
| 27 | _, warnings, err := actor.CloudControllerClient.CreateApplicationProcessScale(appGUID, resources.Process(process)) |
no test coverage detected