Documentation
¶
Index ¶
- func CharmStorageParams(controllerUUID string, storageClassName string, modelCfg *config.Config, ...) (*params.KubernetesFilesystemParams, error)
- func Register(registry facade.FacadeRegistry)
- type API
- func (a *API) ApplicationOCIResources(args params.Entities) (params.CAASApplicationOCIResourceResults, error)
- func (a *API) ClearApplicationsResources(args params.Entities) (params.ErrorResults, error)
- func (a *API) DestroyUnits(args params.DestroyUnitsParams) (params.DestroyUnitResults, error)
- func (a *API) ProvisionerConfig() (params.CAASApplicationProvisionerConfigResult, error)
- func (a *API) ProvisioningInfo(args params.Entities) (params.CAASApplicationProvisioningInfoResults, error)
- func (a *API) ProvisioningState(args params.Entity) (params.CAASApplicationProvisioningStateResult, error)
- func (a *API) SetOperatorStatus(args params.SetStatus) (params.ErrorResults, error)
- func (a *API) SetProvisioningState(args params.CAASApplicationProvisioningStateArg) (params.ErrorResult, error)
- func (a *API) Units(args params.Entities) (params.CAASUnitsResults, error)
- func (a *API) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.UpdateApplicationUnitResults, error)
- func (a *API) WatchApplications() (params.StringsWatchResult, error)
- func (a *API) WatchProvisioningInfo(args params.Entities) (params.NotifyWatchResults, error)
- func (a *API) WatchUnits(args params.Entities) (params.StringsWatchResults, error)
- type APIGroup
- type Application
- type CAASApplicationControllerState
- type CAASApplicationProvisionerState
- type Charm
- type Model
- type NewResourceOpenerFunc
- type Resources
- type StorageBackend
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CharmStorageParams ¶
func CharmStorageParams( controllerUUID string, storageClassName string, modelCfg *config.Config, poolName string, poolManager poolmanager.PoolManager, registry storage.ProviderRegistry, ) (*params.KubernetesFilesystemParams, error)
CharmStorageParams returns filesystem parameters needed to provision storage used for a charm operator or workload.
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewCAASApplicationProvisionerAPI ¶
func NewCAASApplicationProvisionerAPI( ctrlSt CAASApplicationControllerState, st CAASApplicationProvisionerState, resources facade.Resources, newResourceOpener NewResourceOpenerFunc, authorizer facade.Authorizer, sb StorageBackend, storagePoolManager poolmanager.PoolManager, registry storage.ProviderRegistry, clock clock.Clock, ) (*API, error)
NewCAASApplicationProvisionerAPI returns a new CAAS operator provisioner API facade.
func (*API) ApplicationOCIResources ¶
func (a *API) ApplicationOCIResources(args params.Entities) (params.CAASApplicationOCIResourceResults, error)
ApplicationOCIResources returns the OCI image resources for an application.
func (*API) ClearApplicationsResources ¶
ClearApplicationsResources clears the flags which indicate applications still have resources in the cluster.
func (*API) DestroyUnits ¶
func (a *API) DestroyUnits(args params.DestroyUnitsParams) (params.DestroyUnitResults, error)
DestroyUnits is responsible for scaling down a set of units on the this Application.
func (*API) ProvisionerConfig ¶
func (a *API) ProvisionerConfig() (params.CAASApplicationProvisionerConfigResult, error)
ProvisionerConfig returns the provisioner's configuration.
func (*API) ProvisioningInfo ¶
func (a *API) ProvisioningInfo(args params.Entities) (params.CAASApplicationProvisioningInfoResults, error)
ProvisioningInfo returns the info needed to provision a caas application.
func (*API) ProvisioningState ¶
func (a *API) ProvisioningState(args params.Entity) (params.CAASApplicationProvisioningStateResult, error)
ProvisioningState returns the provisioning state for the application.
func (*API) SetOperatorStatus ¶
SetOperatorStatus sets the status of each given entity.
func (*API) SetProvisioningState ¶
func (a *API) SetProvisioningState(args params.CAASApplicationProvisioningStateArg) (params.ErrorResult, error)
SetProvisioningState sets the provisioning state for the application.
func (*API) UpdateApplicationsUnits ¶
func (a *API) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.UpdateApplicationUnitResults, error)
UpdateApplicationsUnits updates the Juju data model to reflect the given units of the specified application.
func (*API) WatchApplications ¶
func (a *API) WatchApplications() (params.StringsWatchResult, error)
WatchApplications starts a StringsWatcher to watch applications deployed to this model.
func (*API) WatchProvisioningInfo ¶
WatchProvisioningInfo provides a watcher for changes that affect the information returned by ProvisioningInfo. This is useful for ensuring the latest application stated is ensured.
func (*API) WatchUnits ¶
WatchUnits starts a StringsWatcher to watch changes to the lifecycle states of units for the specified applications in this model.
type APIGroup ¶
type APIGroup struct { *common.PasswordChanger *common.LifeGetter *common.AgentEntityWatcher *common.Remover *API // contains filtered or unexported fields }
func NewStateCAASApplicationProvisionerAPI ¶
NewStateCAASApplicationProvisionerAPI provides the signature required for facade registration.
func (*APIGroup) ApplicationCharmInfo ¶
ApplicationCharmInfo returns information about an application's charm.
type Application ¶
type Application interface { Charm() (ch Charm, force bool, err error) CharmPendingToBeDownloaded() bool SetOperatorStatus(status.StatusInfo) error AllUnits() ([]Unit, error) UpdateUnits(unitsOp *state.UpdateUnitsOperation) error StorageConstraints() (map[string]state.StorageConstraints, error) DeviceConstraints() (map[string]state.DeviceConstraints, error) Name() string Constraints() (constraints.Value, error) Life() state.Life Base() state.Base SetStatus(statusInfo status.StatusInfo) error CharmModifiedVersion() int CharmURL() (curl *string, force bool) ApplicationConfig() (coreconfig.ConfigAttributes, error) GetScale() int ClearResources() error Watch() state.NotifyWatcher WatchUnits() state.StringsWatcher ProvisioningState() *state.ApplicationProvisioningState SetProvisioningState(state.ApplicationProvisioningState) error }
type CAASApplicationControllerState ¶
type CAASApplicationControllerState interface { ControllerConfig() (controller.Config, error) Addresses() ([]string, error) ModelUUID() string APIHostPortsForAgents() ([]network.SpaceHostPorts, error) WatchAPIHostPortsForAgents() state.NotifyWatcher WatchControllerConfig() state.NotifyWatcher }
CAASApplicationControllerState provides the subset of controller state required by the CAAS operator provisioner facade.
type CAASApplicationProvisionerState ¶
type CAASApplicationProvisionerState interface { ApplyOperation(state.ModelOperation) error Model() (Model, error) Application(string) (Application, error) ResolveConstraints(cons constraints.Value) (constraints.Value, error) Resources() Resources Unit(string) (Unit, error) WatchApplications() state.StringsWatcher IsController() bool }
CAASApplicationProvisionerState provides the subset of model state required by the CAAS operator provisioner facade.
type Model ¶
type Model interface { UUID() string ModelConfig() (*config.Config, error) Containers(providerIds ...string) ([]state.CloudContainer, error) WatchForModelConfigChanges() state.NotifyWatcher }
type NewResourceOpenerFunc ¶
type StorageBackend ¶
type StorageBackend interface { StorageInstance(names.StorageTag) (state.StorageInstance, error) Filesystem(names.FilesystemTag) (state.Filesystem, 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, force bool, maxWait time.Duration) (err error) DestroyFilesystem(tag names.FilesystemTag, force bool) (err error) }
StorageBackend provides the subset of backend storage functionality required by the CAAS app provisioner facade.
type Unit ¶
type Unit interface { Tag() names.Tag DestroyOperation() *state.DestroyUnitOperation EnsureDead() error ContainerInfo() (state.CloudContainer, error) UpdateOperation(props state.UnitUpdateProperties) *state.UpdateUnitOperation Status() (status.StatusInfo, error) }