Documentation ¶
Overview ¶
machineactions implements the the api side of running actions on machines
Index ¶
- type Action
- type Client
- func (c *Client) Action(tag names.ActionTag) (*Action, error)
- func (c *Client) ActionBegin(tag names.ActionTag) error
- func (c *Client) ActionFinish(tag names.ActionTag, status string, actionResults map[string]interface{}, ...) error
- func (c *Client) RunningActions(agent names.MachineTag) ([]params.ActionResult, error)
- func (c *Client) WatchActionNotifications(agent names.MachineTag) (watcher.StringsWatcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
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 ¶
func NewAction(id, name string, params map[string]interface{}, parallel bool, executionGroup string) *Action
NewAction makes a new Action with specified id, name and params map.
func (*Action) ExecutionGroup ¶
ExecutionGroup is the group of actions which cannot execute in parallel with each other.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ActionBegin ¶
ActionBegin marks an action as running.
func (*Client) ActionFinish ¶
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 ¶
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 ¶
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.