Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type APIv7
- type ActionAPI
- func (a *ActionAPI) Actions(ctx context.Context, arg params.Entities) (params.ActionResults, error)
- func (a *ActionAPI) ApplicationsCharmsActions(ctx context.Context, args params.Entities) (params.ApplicationsCharmActionsResults, error)
- func (a *ActionAPI) Cancel(ctx context.Context, arg params.Entities) (params.ActionResults, error)
- func (a *ActionAPI) EnqueueOperation(ctx context.Context, arg params.Actions) (params.EnqueuedActions, error)
- func (a *ActionAPI) ListOperations(ctx context.Context, arg params.OperationQueryArgs) (params.OperationResults, error)
- func (a *ActionAPI) Operations(ctx context.Context, arg params.Entities) (params.OperationResults, error)
- func (a *ActionAPI) Run(ctx context.Context, run params.RunParams) (results params.EnqueuedActions, err error)
- func (a *ActionAPI) RunOnAllMachines(ctx context.Context, run params.RunParams) (results params.EnqueuedActions, err error)
- func (api *ActionAPI) WatchActionsProgress(ctx context.Context, actions params.Entities) (params.StringsWatchResults, error)
- type ApplicationService
- type Model
- type State
- type TagToActionReceiverFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type ActionAPI ¶
type ActionAPI struct {
// contains filtered or unexported fields
}
ActionAPI implements the client API for interacting with Actions
func (*ActionAPI) Actions ¶
Actions takes a list of ActionTags, and returns the full Action for each ID.
func (*ActionAPI) ApplicationsCharmsActions ¶
func (a *ActionAPI) ApplicationsCharmsActions(ctx context.Context, args params.Entities) (params.ApplicationsCharmActionsResults, error)
ApplicationsCharmsActions returns a slice of charm Actions for a slice of services.
func (*ActionAPI) EnqueueOperation ¶
func (a *ActionAPI) EnqueueOperation(ctx context.Context, 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 designated ActionReceiver. We return the ID of the overall operation and each individual task.
func (*ActionAPI) ListOperations ¶
func (a *ActionAPI) ListOperations(ctx context.Context, arg params.OperationQueryArgs) (params.OperationResults, error)
ListOperations fetches the called actions for specified apps/units.
func (*ActionAPI) Operations ¶
func (a *ActionAPI) Operations(ctx context.Context, arg params.Entities) (params.OperationResults, error)
Operations fetches the specified operation ids.
func (*ActionAPI) Run ¶
func (a *ActionAPI) Run(ctx context.Context, run params.RunParams) (results params.EnqueuedActions, err error)
Run the commands specified on the machines identified through the list of machines, units and services.
func (*ActionAPI) RunOnAllMachines ¶
func (a *ActionAPI) RunOnAllMachines(ctx context.Context, run params.RunParams) (results params.EnqueuedActions, err error)
RunOnAllMachines attempts to run the specified command on all the machines.
func (*ActionAPI) WatchActionsProgress ¶
func (api *ActionAPI) WatchActionsProgress(ctx context.Context, actions params.Entities) (params.StringsWatchResults, error)
WatchActionsProgress creates a watcher that reports on action log messages.
type ApplicationService ¶
type ApplicationService interface { // GetCharmLocatorByApplicationName returns a CharmLocator by application name. // It returns an error if the charm can not be found by the name. This can also // be used as a cheap way to see if a charm exists without needing to load the // charm metadata. GetCharmLocatorByApplicationName(ctx context.Context, name string) (applicationcharm.CharmLocator, error) // GetCharmActions returns the actions for the charm using the charm name, // source and revision. // // If the charm does not exist, a [applicationerrors.CharmNotFound] error is // returned. GetCharmActions(ctx context.Context, locator applicationcharm.CharmLocator) (internalcharm.Actions, error) }
ApplicationService is an interface that provides access to application entities.
type Model ¶
type Model interface { ActionByTag(tag names.ActionTag) (state.Action, error) AddAction(receiver state.ActionReceiver, operationID, name string, payload map[string]interface{}, parallel *bool, executionGroup *string) (state.Action, error) EnqueueOperation(summary string, count int) (string, error) FailOperationEnqueuing(operationID, failMessage string, count int) error FindActionsByName(name string) ([]state.Action, error) ListOperations(actionNames []string, actionReceivers []names.Tag, operationStatus []state.ActionStatus, offset, limit int, ) ([]state.OperationInfo, bool, error) ModelTag() names.ModelTag OperationWithActions(id string) (*state.OperationInfo, error) Type() state.ModelType }
Model describes model state used by the action facade.
type State ¶
type State interface { AllApplications() ([]*state.Application, error) AllMachines() ([]*state.Machine, error) Application(name string) (*state.Application, error) FindEntity(tag names.Tag) (state.Entity, error) Model() (Model, error) WatchActionLogs(actionId string) state.StringsWatcher }
State provides the subset of global state required by the action facade.