Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type ApplicationService
- type ControllerConfigGetter
- type DeployerAPI
- func (d *DeployerAPI) APIAddresses(ctx context.Context) (result params.StringsResult, err error)
- func (d *DeployerAPI) APIHostPorts(ctx context.Context) (result params.APIHostPortsResult, err error)
- func (d *DeployerAPI) ConnectionInfo(ctx context.Context) (result params.DeployerConnectionValues, err error)
- func (d *DeployerAPI) Life(ctx context.Context, args params.Entities) (params.LifeResults, error)
- func (d *DeployerAPI) ModelUUID() params.StringResult
- func (d *DeployerAPI) Remove(ctx context.Context, args params.Entities) (params.ErrorResults, error)
- func (d *DeployerAPI) SetStatus(ctx context.Context, args params.SetStatus) (params.ErrorResults, error)
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 ApplicationService ¶
type ApplicationService interface { GetUnitLife(context.Context, coreunit.Name) (life.Value, error) EnsureUnitDead(context.Context, coreunit.Name, leadership.Revoker) error RemoveUnit(context.Context, coreunit.Name, leadership.Revoker) error }
ApplicationService removes a unit from the dqlite database.
type ControllerConfigGetter ¶
type ControllerConfigGetter interface {
ControllerConfig(context.Context) (controller.Config, error)
}
ControllerConfigGetter is the interface that the facade needs to get controller config.
type DeployerAPI ¶
type DeployerAPI struct { *common.PasswordChanger *common.APIAddresser *common.UnitsWatcher *common.StatusSetter // contains filtered or unexported fields }
DeployerAPI provides access to the Deployer API facade.
func NewDeployerAPI ¶
func NewDeployerAPI( controllerConfigGetter ControllerConfigGetter, applicationService ApplicationService, authorizer facade.Authorizer, st *state.State, store objectstore.ObjectStore, resources facade.Resources, leadershipRevoker leadership.Revoker, systemState *state.State, clock clock.Clock, ) (*DeployerAPI, error)
NewDeployerAPI creates a new server-side DeployerAPI facade.
func NewDeployerFacade ¶
func NewDeployerFacade(ctx facade.ModelContext) (*DeployerAPI, error)
NewDeployerFacade creates a new server-side DeployerAPI facade.
func (*DeployerAPI) APIAddresses ¶
func (d *DeployerAPI) APIAddresses(ctx context.Context) (result params.StringsResult, err error)
APIAddresses returns the list of addresses used to connect to the API.
func (*DeployerAPI) APIHostPorts ¶
func (d *DeployerAPI) APIHostPorts(ctx context.Context) (result params.APIHostPortsResult, err error)
APIHostPorts returns the API server addresses.
func (*DeployerAPI) ConnectionInfo ¶
func (d *DeployerAPI) ConnectionInfo(ctx context.Context) (result params.DeployerConnectionValues, err error)
ConnectionInfo returns all the address information that the deployer task needs in one call.
func (*DeployerAPI) Life ¶
func (d *DeployerAPI) Life(ctx context.Context, args params.Entities) (params.LifeResults, error)
Life returns the life of the specified units.
func (*DeployerAPI) ModelUUID ¶
func (d *DeployerAPI) ModelUUID() params.StringResult
ModelUUID returns the model UUID that this facade is deploying into. It is implemented here directly as a result of removing it from embedded APIAddresser *without* bumping the facade version. It should be blanked when this facade version is next incremented.
func (*DeployerAPI) Remove ¶
func (d *DeployerAPI) Remove(ctx context.Context, args params.Entities) (params.ErrorResults, error)
Remove removes every given unit from state, calling EnsureDead first, then Remove.
func (*DeployerAPI) SetStatus ¶
func (d *DeployerAPI) SetStatus(ctx context.Context, args params.SetStatus) (params.ErrorResults, error)
SetStatus sets the status of the specified entities.