Documentation ¶
Index ¶
- func GetActionResult(api APIClient, requestedId string, tick, wait clock.Timer) (actionapi.ActionResult, error)
- func NewCancelCommand() cmd.Command
- func NewExecCommand(store jujuclient.ClientStore) cmd.Command
- func NewListCommand() cmd.Command
- func NewListOperationsCommand() cmd.Command
- func NewRunCommand() cmd.Command
- func NewShowCommand() cmd.Command
- func NewShowOperationCommand() cmd.Command
- func NewShowTaskCommand() cmd.Command
- type APIClient
- type ActionCommandBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActionResult ¶
func GetActionResult(api APIClient, requestedId string, tick, wait clock.Timer) (actionapi.ActionResult, error)
GetActionResult tries to repeatedly fetch a task until it is in a completed state and then it returns it. It waits for a maximum of "wait" before returning with the latest action status.
func NewCancelCommand ¶
func NewExecCommand ¶
func NewExecCommand(store jujuclient.ClientStore) cmd.Command
NewExecCommand returns an exec command.
func NewListCommand ¶
func NewListOperationsCommand ¶
NewListOperationsCommand returns a ListOperations command.
func NewRunCommand ¶
func NewShowCommand ¶
NewShowCommand returns a command to print action information.
func NewShowOperationCommand ¶
func NewShowTaskCommand ¶
Types ¶
type APIClient ¶
type APIClient interface { io.Closer // RunOnAllMachines runs the command on all the machines with the specified // timeout. RunOnAllMachines(commands string, timeout time.Duration) (action.EnqueuedActions, error) // Run the Commands specified on the machines identified through the ids // provided in the machines, applications and units slices. Run(action.RunParams) (action.EnqueuedActions, error) // EnqueueOperation takes a list of Actions and queues them up to be executed as // an operation, each action running as a task on the the designated ActionReceiver. // We return the ID of the overall operation and each individual task. EnqueueOperation([]action.Action) (action.EnqueuedActions, error) // Cancel attempts to cancel a queued up Action from running. Cancel([]string) ([]action.ActionResult, error) // ApplicationCharmActions is a single query which uses ApplicationsCharmsActions to // get the charm.Actions for a single application by tag. ApplicationCharmActions(appName string) (map[string]action.ActionSpec, error) // Actions fetches actions by tag. These Actions can be used to get // the ActionReceiver if necessary. Actions([]string) ([]action.ActionResult, error) // ListOperations fetches the operation summaries for specified apps/units. ListOperations(action.OperationQueryArgs) (action.Operations, error) // Operation fetches the operation with the specified id. Operation(id string) (action.Operation, error) // WatchActionProgress reports on logged action progress messages. WatchActionProgress(actionId string) (watcher.StringsWatcher, error) }
APIClient represents the action API functionality.
type ActionCommandBase ¶
type ActionCommandBase struct {
modelcmd.ModelCommandBase
}
ActionCommandBase is the base type for action sub-commands.
func (*ActionCommandBase) NewActionAPIClient ¶
func (c *ActionCommandBase) NewActionAPIClient() (APIClient, error)
NewActionAPIClient returns a client for the action api endpoint.
Click to show internal directories.
Click to hide internal directories.