Documentation ¶
Index ¶
- type Application
- type CAASBrokerInterface
- type CAASControllerState
- type CAASOperatorState
- type Charm
- type Facade
- func (f *Facade) Charm(args params.Entities) (params.ApplicationCharmResults, error)
- func (f *Facade) CurrentModel() (params.ModelResult, error)
- func (f *Facade) ModelUUID() params.StringResult
- func (f *Facade) SetPodSpec(args params.SetPodSpecParams) (params.ErrorResults, error)
- func (f *Facade) SetStatus(args params.SetStatus) (params.ErrorResults, error)
- func (f *Facade) WatchContainerStart(args params.WatchContainerStartArgs) (params.StringsWatchResults, error)
- func (f *Facade) WatchUnits(args params.Entities) (params.StringsWatchResults, error)
- type Model
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { Charm() (Charm, bool, error) CharmModifiedVersion() int SetOperatorStatus(status.StatusInfo) error WatchUnits() state.StringsWatcher }
Application provides the subset of application state required by the CAAS operator facade.
type CAASBrokerInterface ¶
type CAASBrokerInterface interface {
WatchContainerStart(appName string, containerName string) (corewatcher.StringsWatcher, error)
}
type CAASControllerState ¶
type CAASControllerState interface { Addresses() ([]string, error) ModelUUID() string WatchAPIHostPortsForAgents() state.NotifyWatcher APIHostPortsForAgents() ([]network.SpaceHostPorts, error) }
CAASControllerState provides the subset of controller state required by the CAAS operator facade.
type CAASOperatorState ¶
type CAASOperatorState interface { Application(string) (Application, error) Model() (Model, error) FindEntity(names.Tag) (state.Entity, error) }
CAASOperatorState provides the subset of model state required by the CAAS operator facade.
type Charm ¶
type Charm interface { URL() *charm.URL BundleSha256() string Meta() *charm.Meta }
Charm provides the subset of charm state required by the CAAS operator facade.
type Facade ¶
type Facade struct { *common.LifeGetter *common.AgentEntityWatcher *common.Remover *common.ToolsSetter *common.APIAddresser // contains filtered or unexported fields }
Facade is the CAAS operator API facade.
func NewFacade ¶
func NewFacade( resources facade.Resources, authorizer facade.Authorizer, ctrlSt CAASControllerState, st CAASOperatorState, appGetter unitcommon.ApplicationGetter, broker CAASBrokerInterface, leadershipRevoker leadership.Revoker, ) (*Facade, error)
NewFacade returns a new CAASOperator facade.
func NewStateFacade ¶
NewStateFacade provides the signature required for facade registration.
func (*Facade) CurrentModel ¶
func (f *Facade) CurrentModel() (params.ModelResult, error)
CurrentModel returns the name and UUID for the current juju model.
func (*Facade) ModelUUID ¶
func (f *Facade) ModelUUID() params.StringResult
ModelUUID returns the model UUID that this facade is used to operate. 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 (*Facade) SetPodSpec ¶
func (f *Facade) SetPodSpec(args params.SetPodSpecParams) (params.ErrorResults, error)
SetPodSpec sets the container specs for a set of applications. TODO(juju3) - remove
func (*Facade) WatchContainerStart ¶
func (f *Facade) WatchContainerStart(args params.WatchContainerStartArgs) (params.StringsWatchResults, error)
WatchContainerStart starts a StringWatcher to watch for container start events on the CAAS api for a specific application and container.
func (*Facade) WatchUnits ¶
WatchUnits starts a StringsWatcher to watch changes to the lifecycle states of units for the specified applications in this model.
type Model ¶
type Model interface { SetPodSpec(leadership.Token, names.ApplicationTag, *string) error Name() string UUID() string Type() state.ModelType ModelConfig() (*config.Config, error) Containers(providerIds ...string) ([]state.CloudContainer, error) }
Model provides the subset of CAAS model state required by the CAAS operator facade.