Documentation ¶
Index ¶
- func Manifold(config ManifoldConfig) dependency.Manifold
- func NewAppWorker(config AppWorkerConfig) func() (worker.Worker, error)
- func NewProvisionerWorker(config Config) (worker.Worker, error)
- type AppWorkerConfig
- type CAASBroker
- type CAASProvisionerFacade
- type CAASUnitProvisionerFacade
- type Config
- type Logger
- type ManifoldConfig
- type NewAppWorkerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold creates a manifold that runs a CAAS operator provisioner. See the ManifoldConfig type for discussion about how this can/should evolve.
func NewAppWorker ¶
func NewAppWorker(config AppWorkerConfig) func() (worker.Worker, error)
func NewProvisionerWorker ¶
NewProvisionerWorker starts and returns a new CAAS provisioner worker.
Types ¶
type AppWorkerConfig ¶
type AppWorkerConfig struct { Name string Facade CAASProvisionerFacade Broker CAASBroker ModelTag names.ModelTag Clock clock.Clock Logger Logger UnitFacade CAASUnitProvisionerFacade }
type CAASBroker ¶
type CAASBroker interface { Application(string, caas.DeploymentType) caas.Application AnnotateUnit(appName string, mode caas.DeploymentMode, podName string, unit names.UnitTag) error DeleteOperator(appName string) error DeleteService(appName string) error OperatorExists(appName string) (caas.DeploymentState, error) Units(appName string, mode caas.DeploymentMode) ([]caas.Unit, error) }
CAASBroker exposes CAAS broker functionality to a worker.
type CAASProvisionerFacade ¶
type CAASProvisionerFacade interface { ProvisioningInfo(string) (api.ProvisioningInfo, error) WatchApplications() (watcher.StringsWatcher, error) SetPassword(string, string) error Life(string) (life.Value, error) CharmInfo(string) (*charmscommon.CharmInfo, error) ApplicationCharmInfo(string) (*charmscommon.CharmInfo, error) SetOperatorStatus(appName string, status status.Status, message string, data map[string]interface{}) error Units(appName string) ([]params.CAASUnit, error) GarbageCollect(appName string, observedUnits []names.Tag, desiredReplicas int, activePodNames []string, force bool) error ApplicationOCIResources(appName string) (map[string]resources.DockerImageDetails, error) UpdateUnits(arg params.UpdateApplicationUnits) (*params.UpdateApplicationUnitsInfo, error) WatchApplication(appName string) (watcher.NotifyWatcher, error) }
CAASProvisionerFacade exposes CAAS provisioning functionality to a worker.
type CAASUnitProvisionerFacade ¶
type CAASUnitProvisionerFacade interface { ApplicationScale(string) (int, error) WatchApplicationScale(string) (watcher.NotifyWatcher, error) ApplicationTrust(string) (bool, error) WatchApplicationTrustHash(string) (watcher.StringsWatcher, error) UpdateApplicationService(arg params.UpdateApplicationServiceArg) error }
type Config ¶
type Config struct { Facade CAASProvisionerFacade Broker CAASBroker ModelTag names.ModelTag Clock clock.Clock Logger Logger NewAppWorker NewAppWorkerFunc UnitFacade CAASUnitProvisionerFacade }
Config defines the operation of a Worker.
type Logger ¶
type Logger interface { Debugf(string, ...interface{}) Infof(string, ...interface{}) Errorf(string, ...interface{}) Warningf(string, ...interface{}) Tracef(string, ...interface{}) Child(string) loggo.Logger }
Logger represents the methods used by the worker to log details.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string BrokerName string ClockName string NewWorker func(Config) (worker.Worker, error) Logger Logger }
ManifoldConfig defines a CAAS operator provisioner's dependencies.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate is called by start to check for bad configuration.
type NewAppWorkerFunc ¶
type NewAppWorkerFunc func(AppWorkerConfig) func() (worker.Worker, error)
Click to show internal directories.
Click to hide internal directories.