caasoperatorprovisioner

package
v0.0.0-...-b0bff92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

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 NewProvisionerWorker

func NewProvisionerWorker(config Config) (worker.Worker, error)

NewProvisionerWorker starts and returns a new CAAS provisioner worker.

Types

type CAASProvisionerFacade

type CAASProvisionerFacade interface {
	OperatorProvisioningInfo(string) (apicaasprovisioner.OperatorProvisioningInfo, error)
	WatchApplications() (watcher.StringsWatcher, error)
	SetPasswords([]apicaasprovisioner.ApplicationPassword) (params.ErrorResults, error)
	Life(string) (life.Value, error)
	IssueOperatorCertificate(string) (apicaasprovisioner.OperatorCertificate, error)
	ApplicationCharmInfo(appName string) (*charmscommon.CharmInfo, error)
}

CAASProvisionerFacade exposes CAAS provisioning functionality to a worker.

type Config

type Config struct {
	Facade          CAASProvisionerFacade
	OperatorManager caas.ApplicationOperatorManager
	ModelTag        names.ModelTag
	AgentConfig     agent.Config
	Clock           clock.Clock
	Logger          Logger
}

Config defines the operation of a Worker.

type Logger

type Logger interface {
	Debugf(string, ...interface{})
	Infof(string, ...interface{})
	Tracef(string, ...interface{})
}

Logger represents the methods used by the worker to log details.

type ManifoldConfig

type ManifoldConfig struct {
	AgentName     string
	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL