Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSuperCommand ¶
NewSuperCommand returns a new action super-command.
Types ¶
type APIClient ¶
type APIClient interface { io.Closer // 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. Enqueue(params.Actions) (params.ActionResults, error) // ListAll takes a list of Tags representing ActionReceivers and returns // all of the Actions that have been queued or run by each of those // Entities. ListAll(params.Entities) (params.ActionsByReceivers, error) // ListPending takes a list of Tags representing ActionReceivers // and returns all of the Actions that are queued for each of those // Entities. ListPending(params.Entities) (params.ActionsByReceivers, error) // ListCompleted takes a list of Tags representing ActionReceivers // and returns all of the Actions that have been run on each of those // Entities. ListCompleted(params.Entities) (params.ActionsByReceivers, error) // Cancel attempts to cancel a queued up Action from running. Cancel(params.Actions) (params.ActionResults, error) // ServiceCharmActions is a single query which uses ServicesCharmActions to // get the charm.Actions for a single Service by tag. ServiceCharmActions(params.Entity) (*charm.Actions, error) // Actions fetches actions by tag. These Actions can be used to get // the ActionReceiver if necessary. Actions(params.Entities) (params.ActionResults, error) // FindActionTagsByPrefix takes a list of string prefixes and finds // corresponding ActionTags that match that prefix. FindActionTagsByPrefix(params.FindTags) (params.FindTagsResults, error) }
type APIClient represents the action API functionality.
type ActionCommandBase ¶
type ActionCommandBase struct {
envcmd.EnvCommandBase
}
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.
type DefinedCommand ¶
type DefinedCommand struct { ActionCommandBase // contains filtered or unexported fields }
DefinedCommand lists actions defined by the charm of a given service.
func (*DefinedCommand) Info ¶
func (c *DefinedCommand) Info() *cmd.Info
func (*DefinedCommand) Init ¶
func (c *DefinedCommand) Init(args []string) error
Init validates the service name and any other options.
func (*DefinedCommand) Run ¶
func (c *DefinedCommand) Run(ctx *cmd.Context) error
Run grabs the Actions spec from the api. It then sets up a sensible output format for the map.
func (*DefinedCommand) SetFlags ¶
func (c *DefinedCommand) SetFlags(f *gnuflag.FlagSet)
Set up the output.
type DoCommand ¶
type DoCommand struct { ActionCommandBase // contains filtered or unexported fields }
DoCommand enqueues an Action for running on the given unit with given params
type FetchCommand ¶
type FetchCommand struct { ActionCommandBase // contains filtered or unexported fields }
FetchCommand fetches the results of an action by ID.
func (*FetchCommand) Info ¶
func (c *FetchCommand) Info() *cmd.Info
func (*FetchCommand) Init ¶
func (c *FetchCommand) Init(args []string) error
Init validates the action ID and any other options.
func (*FetchCommand) Run ¶
func (c *FetchCommand) Run(ctx *cmd.Context) error
Run issues the API call to get Actions by ID.
func (*FetchCommand) SetFlags ¶
func (c *FetchCommand) SetFlags(f *gnuflag.FlagSet)
Set up the output.
type StatusCommand ¶
type StatusCommand struct { ActionCommandBase // contains filtered or unexported fields }
StatusCommand shows the status of an Action by ID.
func (*StatusCommand) Info ¶
func (c *StatusCommand) Info() *cmd.Info
func (*StatusCommand) Init ¶
func (c *StatusCommand) Init(args []string) error
func (*StatusCommand) SetFlags ¶
func (c *StatusCommand) SetFlags(f *gnuflag.FlagSet)
Set up the output.