juju: github.com/juju/juju/api/machineactions Index | Files

package machineactions

import "github.com/juju/juju/api/machineactions"

machineactions implements the the api side of running actions on machines

Index

Package Files

action.go machineactions.go

type Action Uses

type Action struct {
    // contains filtered or unexported fields
}

Action represents a single instance of an Action call, by name and params. TODO(bogdantelega): This is currently copied from uniter.Actions, but until the implementations converge, it's saner to duplicate the code since the "correct" abstraction over both is not obvious.

func NewAction Uses

func NewAction(name string, params map[string]interface{}) *Action

NewAction makes a new Action with specified name and params map.

func (*Action) Name Uses

func (a *Action) Name() string

Name retrieves the name of the Action.

func (*Action) Params Uses

func (a *Action) Params() map[string]interface{}

Params retrieves the params map of the Action.

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

func NewClient Uses

func NewClient(caller base.APICaller) *Client

func (*Client) Action Uses

func (c *Client) Action(tag names.ActionTag) (*Action, error)

Action returns the Action with the given tag.

func (*Client) ActionBegin Uses

func (c *Client) ActionBegin(tag names.ActionTag) error

ActionBegin marks an action as running.

func (*Client) ActionFinish Uses

func (c *Client) ActionFinish(tag names.ActionTag, status string, actionResults map[string]interface{}, message string) error

ActionFinish captures the structured output of an action.

func (*Client) RunningActions Uses

func (c *Client) RunningActions(agent names.MachineTag) ([]params.ActionResult, error)

RunningActions returns a list of actions running for the given machine tag.

func (*Client) WatchActionNotifications Uses

func (c *Client) WatchActionNotifications(agent names.MachineTag) (watcher.StringsWatcher, error)

WatchActionNotifications returns a StringsWatcher for observing the IDs of Actions added to the Machine. The initial event will contain the IDs of any Actions pending at the time the Watcher is made.

Package machineactions imports 6 packages (graph) and is imported by 21 packages. Updated 2019-08-25. Refresh now. Tools for package owners.