caasmodelconfigmanager

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 17 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 returns a dependency.Manifold that will run a Worker as configured.

func NewWorker

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

NewWorker returns a worker that unlocks the model upgrade gate.

Types

type CAASBroker

type CAASBroker interface {
	EnsureImageRepoSecret(context.Context, docker.ImageRepoDetails) error
}

type Config

type Config struct {
	ModelTag names.ModelTag

	Facade       Facade
	Broker       CAASBroker
	Logger       logger.Logger
	Clock        clock.Clock
	RegistryFunc func(docker.ImageRepoDetails) (registry.Registry, error)
}

Config holds the configuration and dependencies for a worker.

func (Config) Validate

func (config Config) Validate() error

Validate returns an error if the config cannot be expected to drive a functional worker.

type Facade

type Facade interface {
	ControllerConfig(context.Context) (controller.Config, error)
	WatchControllerConfig(context.Context) (watcher.StringsWatcher, error)
}

func NewFacade

func NewFacade(caller base.APICaller) (Facade, error)

NewFacade returns a facade for caasapplicationprovisioner worker to use.

type ManifoldConfig

type ManifoldConfig struct {
	APICallerName string
	BrokerName    string

	NewFacade func(base.APICaller) (Facade, error)
	NewWorker func(Config) (worker.Worker, error)

	Logger logger.Logger
	Clock  clock.Clock
}

ManifoldConfig describes how to configure and construct a Worker, and what registered resources it may depend upon.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

Validate is called by start to check for bad configuration.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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