MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / GetActionToExecute

Function GetActionToExecute

commands/action.go:17–35  ·  view source on GitHub ↗

GetActionToExecute returns the action to execute specified with action ID

(actionID, commandName string, monitoringRetries uint)

Source from the content-addressed store, hash-verified

15
16// GetActionToExecute returns the action to execute specified with action ID
17func GetActionToExecute(actionID, commandName string, monitoringRetries uint) Action {
18 switch actionID {
19 case "abort":
20 action := newAction(actionID, VerbosityLevelVERBOSE)
21 return &action
22 case "retry":
23 action := newMonitoringAction(actionID, commandName, VerbosityLevelVERBOSE, monitoringRetries)
24 return &action
25 case "resume":
26 action := newMonitoringAction(actionID, commandName, VerbosityLevelVERBOSE, monitoringRetries)
27 return &action
28 case "monitor":
29 return &MonitorAction{
30 commandName: commandName,
31 monitoringRetries: monitoringRetries,
32 }
33 }
34 return nil
35}
36
37func GetNoRetriesActionToExecute(actionID, commandName string) Action {
38 return GetActionToExecute(actionID, commandName, 0)

Callers 2

ExecuteActionMethod · 0.85

Calls 2

newActionFunction · 0.85
newMonitoringActionFunction · 0.85

Tested by

no test coverage detected