juju: github.com/wallyworld/juju/api/action Index | Files

package action

import "github.com/wallyworld/juju/api/action"


Package Files

client.go pruner.go run.go

type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client provides access to the action facade.

func NewClient Uses

func NewClient(st base.APICallCloser) *Client

NewClient returns a new actions client.

func (*Client) Actions Uses

func (c *Client) Actions(arg params.Entities) (params.ActionResults, error)

Actions takes a list of ActionTags, and returns the full Action for each ID.

func (*Client) ApplicationCharmActions Uses

func (c *Client) ApplicationCharmActions(arg params.Entity) (map[string]params.ActionSpec, error)

ApplicationCharmActions is a single query which uses ApplicationsCharmsActions to get the charm.Actions for a single Application by tag.

func (*Client) Cancel Uses

func (c *Client) Cancel(arg params.Entities) (params.ActionResults, error)

Cancel attempts to cancel a queued up Action from running.

func (*Client) Enqueue Uses

func (c *Client) Enqueue(arg params.Actions) (params.ActionResults, error)

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 Uses

func (c *Client) EnqueueOperation(arg params.Actions) (params.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.

func (*Client) FindActionTagsByPrefix Uses

func (c *Client) FindActionTagsByPrefix(arg params.FindTags) (params.FindTagsResults, error)

FindActionTagsByPrefix takes a list of string prefixes and finds corresponding ActionTags that match that prefix.

func (*Client) FindActionsByNames Uses

func (c *Client) FindActionsByNames(arg params.FindActionsByNames) (params.ActionsByNames, error)

FindActionsByNames takes a list of action names and returns actions for every name.

func (*Client) ListOperations Uses

func (c *Client) ListOperations(arg params.OperationQueryArgs) (params.OperationResults, error)

ListOperations fetches the operation summaries for specified apps/units.

func (*Client) Operation Uses

func (c *Client) Operation(id string) (params.OperationResult, error)

Operation fetches the operation with the specified id.

func (*Client) Run Uses

func (c *Client) Run(run params.RunParams) ([]params.ActionResult, error)

Run the Commands specified on the machines identified through the ids provided in the machines, applications and units slices.

func (*Client) RunOnAllMachines Uses

func (c *Client) RunOnAllMachines(commands string, timeout time.Duration) ([]params.ActionResult, error)

RunOnAllMachines runs the command on all the machines with the specified timeout.

func (*Client) WatchActionProgress Uses

func (c *Client) WatchActionProgress(actionId string) (watcher.StringsWatcher, error)

WatchActionProgress returns a watcher that reports on action log messages. The result strings are json formatted core.actions.ActionMessage objects.

type Facade Uses

type Facade struct {
    // contains filtered or unexported fields

Facade allows calls to "ActionPruner" endpoints

func NewFacade Uses

func NewFacade(caller base.APICaller) *Facade

NewFacade builds a facade for the action pruner endpoints

func (*Facade) Prune Uses

func (s *Facade) Prune(maxHistoryTime time.Duration, maxHistoryMB int) error

Prunes action entries by specified age and size

Package action imports 9 packages (graph). Updated 2020-08-11. Refresh now. Tools for package owners.