Documentation ¶
Index ¶
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 Application ¶
type Application interface {
UpsertCAASUnit(args state.UpsertCAASUnitParams) (Unit, error)
}
Application provides the subset of application state required by the CAAS application facade.
type ApplicationService ¶
type ApplicationService interface { RegisterCAASUnit(ctx context.Context, appName string, unit applicationservice.RegisterCAASUnitParams) error CAASUnitTerminating(ctx context.Context, appName string, unitNum int, broker applicationservice.Broker) (bool, error) GetApplicationLife(ctx context.Context, appName string) (life.Value, error) GetUnitLife(ctx context.Context, unitName unit.Name) (life.Value, error) }
ApplicationService instances implement an application service.
type Broker ¶
type Broker interface {
Application(string, caas.DeploymentType) caas.Application
}
Broker contains methods from the caas.Broker interface used by the caasapplication facade.
type ControllerConfigService ¶
type ControllerConfigService interface {
ControllerConfig(context.Context) (controller.Config, error)
}
ControllerConfigService defines the API methods on the ControllerState facade.
type ControllerState ¶
type ControllerState interface {
APIHostPortsForAgents(controller.Config) ([]network.SpaceHostPorts, error)
}
ControllerState provides the subset of controller state required by the CAAS application facade.
type Facade ¶
type Facade struct {
// contains filtered or unexported fields
}
Facade defines the API methods on the CAASApplication facade.
func NewFacade ¶
func NewFacade( resources facade.Resources, authorizer facade.Authorizer, ctrlSt ControllerState, st State, controllerConfigService ControllerConfigService, applicationService ApplicationService, modelConfigService common.ModelConfigService, modelAgentService ModelAgentService, broker Broker, clock clock.Clock, logger logger.Logger, ) (*Facade, error)
NewFacade returns a new CAASOperator facade.
func (*Facade) UnitIntroduction ¶
func (f *Facade) UnitIntroduction(ctx context.Context, args params.CAASUnitIntroductionArgs) (params.CAASUnitIntroductionResult, error)
UnitIntroduction sets the status of each given entity.
func (*Facade) UnitTerminating ¶
func (f *Facade) UnitTerminating(ctx context.Context, args params.Entity) (params.CAASUnitTerminationResult, error)
UnitTerminating should be called by the CAASUnitTerminationWorker when the agent receives a signal to exit. UnitTerminating will return how the agent should shutdown.
type Model ¶
type Model interface { ControllerTag() names.ControllerTag Tag() names.Tag }
Model provides the subset of CAAS model state required by the CAAS application facade.
type ModelAgentService ¶
type ModelAgentService interface { // GetModelTargetAgentVersion returns the target agent version for the // entire model. The following errors can be returned: // - [github.com/juju/juju/domain/model/errors.NotFound] - When the model // does not exist. GetModelTargetAgentVersion(ctx context.Context) (version.Number, error) }
ModelAgentService provides access to the Juju agent version for the model.