- type Action
- type ActionMessage
- type ActionReference
- type ActionResult
- type ActionSpec
- type Client
- func (c *Client) Actions(actionIDs string) (ActionResult, error)
- func (c *Client) ApplicationCharmActions(appName string) (map[string]ActionSpec, error)
- func (c *Client) Cancel(actionIDs string) (ActionResult, error)
- func (c *Client) Enqueue(actions Action) (ActionResult, error)
- func (c *Client) EnqueueOperation(actions Action) (EnqueuedActions, error)
- func (c *Client) FindActionTagsByPrefix(arg params.FindTags) (params.FindTagsResults, error)
- func (c *Client) FindActionsByNames(arg params.FindActionsByNames) (map[string]ActionResult, error)
- func (c *Client) ListOperations(arg OperationQueryArgs) (Operations, error)
- func (c *Client) Operation(id string) (Operation, error)
- func (c *Client) Run(run RunParams) (EnqueuedActions, error)
- func (c *Client) RunOnAllMachines(commands string, timeout time.Duration) (EnqueuedActions, error)
- func (c *Client) WatchActionProgress(actionId string) (watcher.StringsWatcher, error)
- type EnqueuedActions
- type Facade
- type Operation
- type OperationQueryArgs
- type Operations
- type RunParams
Action is a named task to execute on a unit or machine.
type ActionMessage ¶
ActionMessage represents a logged message on an action.
type ActionReference ¶
ActionReference is a reference to an action on a receiver.
type ActionResult ¶
ActionResult is the result of running an action.
type ActionSpec ¶
ActionSpec is a definition of the parameters and traits of an Action. The Params map is expected to conform to JSON-Schema Draft 4 as defined at http://json-schema.org/draft-04/schema# (see http://json-schema.org/latest/json-schema-core.html)
Client provides access to the action facade.
NewClient returns a new actions client.
Actions takes a list of ActionTags, and returns the full Action for each ID.
func (*Client) ApplicationCharmActions ¶
ApplicationCharmActions is a single query which uses ApplicationsCharmsActions to get the charm.Actions for a single Application by tag.
Cancel attempts to cancel a queued up Action from running.
Enqueue takes a list of Actions and queues them up to be executed by the designated ActionReceiver, returning the params.Action for each queued Action, or an error if there was a problem queueing up the Action.
func (*Client) EnqueueOperation ¶
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.
func (*Client) FindActionTagsByPrefix ¶
FindActionTagsByPrefix takes a list of string prefixes and finds corresponding ActionTags that match that prefix.
func (*Client) FindActionsByNames ¶
func (c *Client) FindActionsByNames(arg params.FindActionsByNames) (map[string]ActionResult, error)
FindActionsByNames takes a list of action names and returns actions for every name.
func (*Client) ListOperations ¶
ListOperations fetches the operation summaries for specified apps/units.
Operation fetches the operation with the specified id.
Run the Commands specified on the machines identified through the ids provided in the machines, applications and units slices.
func (*Client) RunOnAllMachines ¶
RunOnAllMachines runs the command on all the machines with the specified timeout.
type EnqueuedActions ¶
EnqueuedActions represents the result of enqueuing actions to run.
Facade allows calls to "ActionPruner" endpoints
NewFacade builds a facade for the action pruner endpoints
Operation holds a list of actions run as part of the operation
type OperationQueryArgs ¶
OperationQueryArgs holds args for listing operations.
type Operations ¶
Operations holds a list of operations and whether the list has been truncated (used for batch queries).
RunParams is used to provide the parameters to the Run method.