juju: github.com/juju/juju/apiserver/facades/agent/machineactions Index | Files

package machineactions

import "github.com/juju/juju/apiserver/facades/agent/machineactions"

machineactions implements the the apiserver side of running actions on machines

Index

Package Files

machineactions.go shim.go

type Backend Uses

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 Uses

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 Uses

func NewExternalFacade(st *state.State, res facade.Resources, auth facade.Authorizer) (*Facade, error)

NewExternalFacade is used for API registration.

func NewFacade Uses

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 Uses

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 Uses

func (f *Facade) BeginActions(args params.Entities) params.ErrorResults

BeginActions marks the actions represented by the passed in Tags as running.

func (*Facade) FinishActions Uses

func (f *Facade) FinishActions(args params.ActionExecutionResults) params.ErrorResults

FinishActions saves the result of a completed Action

func (*Facade) RunningActions Uses

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 Uses

func (f *Facade) WatchActionNotifications(args params.Entities) params.StringsWatchResults

WatchActionNotifications returns a StringsWatcher for observing incoming action calls to a machine.

Package machineactions imports 5 packages (graph) and is imported by 3 packages. Updated 2019-08-23. Refresh now. Tools for package owners.