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

Method GetProcessByTypeAndApplication

actor/v7action/process.go:18–24  ·  view source on GitHub ↗

GetProcessByTypeAndApplication returns a process for the given application and type.

(processType string, appGUID string)

Source from the content-addressed store, hash-verified

16// GetProcessByTypeAndApplication returns a process for the given application
17// and type.
18func (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
26func (actor Actor) ScaleProcessByApplication(appGUID string, process resources.Process) (Warnings, error) {
27 _, warnings, err := actor.CloudControllerClient.CreateApplicationProcessScale(appGUID, resources.Process(process))

Callers 1

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 3

ProcessStruct · 0.92
WarningsTypeAlias · 0.70

Tested by

no test coverage detected