Documentation ¶
Overview ¶
machineactions implements the the apiserver side of running actions on machines
Index ¶
- type Backend
- type Facade
- func (f *Facade) Actions(args params.Entities) params.ActionResults
- func (f *Facade) BeginActions(args params.Entities) params.ErrorResults
- func (f *Facade) FinishActions(args params.ActionExecutionResults) params.ErrorResults
- func (f *Facade) RunningActions(args params.Entities) params.ActionsByReceivers
- func (f *Facade) WatchActionNotifications(args params.Entities) params.StringsWatchResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { ActionByTag(tag names.ActionTag) (state.Action, error) FindEntity(tag names.Tag) (state.Entity, error) TagToActionReceiverFn(findEntity func(names.Tag) (state.Entity, error)) func(string) (state.ActionReceiver, error) ConvertActions(ar state.ActionReceiver, fn common.GetActionsFn) ([]params.ActionResult, error) }
type Facade ¶
type Facade struct {
// contains filtered or unexported fields
}
Facade implements the machineactions interface and is the concrete implementation of the api end point.
func NewExternalFacade ¶
func NewExternalFacade(st *state.State, res facade.Resources, auth facade.Authorizer) (*Facade, error)
NewExternalFacade is used for API registration.
func NewFacade ¶
func NewFacade( backend Backend, resources facade.Resources, authorizer facade.Authorizer, ) (*Facade, error)
NewFacade creates a new server-side machineactions API end point.
func (*Facade) Actions ¶
func (f *Facade) Actions(args params.Entities) params.ActionResults
Actions returns the Actions by Tags passed and ensures that the machine asking for them is the machine that has the actions
func (*Facade) BeginActions ¶
func (f *Facade) BeginActions(args params.Entities) params.ErrorResults
BeginActions marks the actions represented by the passed in Tags as running.
func (*Facade) FinishActions ¶
func (f *Facade) FinishActions(args params.ActionExecutionResults) params.ErrorResults
FinishActions saves the result of a completed Action
func (*Facade) RunningActions ¶
func (f *Facade) RunningActions(args params.Entities) params.ActionsByReceivers
RunningActions lists the actions running for the entities passed in. If we end up needing more than ListRunning at some point we could follow/abstract what's done in the client actions package.
func (*Facade) WatchActionNotifications ¶
func (f *Facade) WatchActionNotifications(args params.Entities) params.StringsWatchResults
WatchActionNotifications returns a StringsWatcher for observing incoming action calls to a machine.