Documentation ¶
Index ¶
- type Application
- type CAASUnitProvisionerState
- type DeviceBackend
- type Facade
- func (f *Facade) ApplicationsConfig(args params.Entities) (params.ApplicationGetConfigResults, error)
- func (f *Facade) ApplicationsScale(args params.Entities) (params.IntResults, error)
- func (f *Facade) ProvisioningInfo(args params.Entities) (params.KubernetesProvisioningInfoResults, error)
- func (a *Facade) SetOperatorStatus(args params.SetStatus) (params.ErrorResults, error)
- func (a *Facade) UpdateApplicationsService(args params.UpdateApplicationServiceArgs) (params.ErrorResults, error)
- func (a *Facade) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.ErrorResults, error)
- func (f *Facade) WatchApplications() (params.StringsWatchResult, error)
- func (f *Facade) WatchApplicationsScale(args params.Entities) (params.NotifyWatchResults, error)
- func (f *Facade) WatchPodSpec(args params.Entities) (params.NotifyWatchResults, error)
- type Model
- type StorageBackend
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { GetScale() int WatchScale() state.NotifyWatcher ApplicationConfig() (application.ConfigAttributes, error) AllUnits() (units []Unit, err error) AddOperation(state.UnitUpdateProperties) *state.AddUnitOperation UpdateUnits(*state.UpdateUnitsOperation) error UpdateCloudService(providerId string, addreses []network.Address) error DeviceConstraints() (map[string]state.DeviceConstraints, error) Life() state.Life Name() string Constraints() (constraints.Value, error) GetPlacement() string SetOperatorStatus(sInfo status.StatusInfo) error }
Application provides the subset of application state required by the CAAS unit provisioner facade.
type CAASUnitProvisionerState ¶
type CAASUnitProvisionerState interface { ControllerConfig() (controller.Config, error) Application(string) (Application, error) FindEntity(names.Tag) (state.Entity, error) Model() (Model, error) WatchApplications() state.StringsWatcher }
CAASUnitProvisionerState provides the subset of global state required by the CAAS unit provisioner facade.
type DeviceBackend ¶
type DeviceBackend interface {
DeviceConstraints(id string) (map[string]state.DeviceConstraints, error)
}
DeviceBackend provides the subset of backend Device functionality required by the CAAS unit provisioner facade.
type Facade ¶
type Facade struct { *common.LifeGetter // contains filtered or unexported fields }
func NewFacade ¶
func NewFacade( resources facade.Resources, authorizer facade.Authorizer, st CAASUnitProvisionerState, sb StorageBackend, db DeviceBackend, storageProviderRegistry storage.ProviderRegistry, storagePoolManager poolmanager.PoolManager, clock clock.Clock, ) (*Facade, error)
NewFacade returns a new CAAS unit provisioner Facade facade.
func NewStateFacade ¶
NewStateFacade provides the signature required for facade registration.
func (*Facade) ApplicationsConfig ¶
func (f *Facade) ApplicationsConfig(args params.Entities) (params.ApplicationGetConfigResults, error)
ApplicationsConfig returns the config for the specified applications.
func (*Facade) ApplicationsScale ¶
ApplicationsScale returns the scaling info for specified applications in this model.
func (*Facade) ProvisioningInfo ¶
func (f *Facade) ProvisioningInfo(args params.Entities) (params.KubernetesProvisioningInfoResults, error)
ProvisioningInfo returns the provisioning info for specified applications in this model.
func (*Facade) SetOperatorStatus ¶
SetOperatorStatus updates the operator status for each given application.
func (*Facade) UpdateApplicationsService ¶
func (a *Facade) UpdateApplicationsService(args params.UpdateApplicationServiceArgs) (params.ErrorResults, error)
UpdateApplicationsService updates the Juju data model to reflect the given service details of the specified application.
func (*Facade) UpdateApplicationsUnits ¶
func (a *Facade) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.ErrorResults, error)
UpdateApplicationsUnits updates the Juju data model to reflect the given units of the specified application.
func (*Facade) WatchApplications ¶
func (f *Facade) WatchApplications() (params.StringsWatchResult, error)
WatchApplications starts a StringsWatcher to watch CAAS applications deployed to this model.
func (*Facade) WatchApplicationsScale ¶
WatchApplicationsScale starts a NotifyWatcher to watch changes to the applications' scale.
func (*Facade) WatchPodSpec ¶
WatchPodSpec starts a NotifyWatcher to watch changes to the pod spec for specified units in this model.
type Model ¶
type Model interface { ModelConfig() (*config.Config, error) PodSpec(tag names.ApplicationTag) (string, error) WatchPodSpec(tag names.ApplicationTag) (state.NotifyWatcher, error) Containers(providerIds ...string) ([]state.CloudContainer, error) }
Model provides the subset of CAAS model state required by the CAAS unit provisioner facade.
type StorageBackend ¶
type StorageBackend interface { StorageInstance(names.StorageTag) (state.StorageInstance, error) Filesystem(names.FilesystemTag) (state.Filesystem, error) FilesystemAttachment(names.Tag, names.FilesystemTag) (state.FilesystemAttachment, error) StorageInstanceFilesystem(names.StorageTag) (state.Filesystem, error) UnitStorageAttachments(unit names.UnitTag) ([]state.StorageAttachment, error) SetFilesystemInfo(names.FilesystemTag, state.FilesystemInfo) error SetFilesystemAttachmentInfo(names.Tag, names.FilesystemTag, state.FilesystemAttachmentInfo) error Volume(tag names.VolumeTag) (state.Volume, error) StorageInstanceVolume(tag names.StorageTag) (state.Volume, error) SetVolumeInfo(names.VolumeTag, state.VolumeInfo) error SetVolumeAttachmentInfo(names.Tag, names.VolumeTag, state.VolumeAttachmentInfo) error // These are for cleanup up orphaned filesystems when pods are recreated. // TODO(caas) - record unit id on the filesystem so we can query by unit AllFilesystems() ([]state.Filesystem, error) DestroyStorageInstance(tag names.StorageTag, destroyAttachments bool) (err error) DestroyFilesystem(tag names.FilesystemTag) (err error) }
StorageBackend provides the subset of backend storage functionality required by the CAAS unit provisioner facade.
type Unit ¶
type Unit interface { Name() string Life() state.Life UnitTag() names.UnitTag ContainerInfo() (state.CloudContainer, error) AgentStatus() (status.StatusInfo, error) UpdateOperation(props state.UnitUpdateProperties) *state.UpdateUnitOperation DestroyOperation() *state.DestroyUnitOperation }