services

package
v0.0.0-...-56cb166 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 90 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerServices

type ControllerServices struct {
	// contains filtered or unexported fields
}

ControllerServices provides access to the services required by the apiserver.

func NewControllerServices

func NewControllerServices(
	controllerDB changestream.WatchableDBFactory,
	dbDeleter database.DBDeleter,
	clock clock.Clock,
	logger logger.Logger,
) *ControllerServices

NewControllerServices returns a new registry which uses the provided controllerDB function to obtain a controller database.

func (*ControllerServices) Access

Access returns the access service, this includes users and permissions.

func (*ControllerServices) AutocertCache

func (s *ControllerServices) AutocertCache() *autocertcacheservice.Service

AutocertCache returns the autocert cache service.

func (*ControllerServices) Cloud

Cloud returns the cloud service.

func (*ControllerServices) Controller

func (s *ControllerServices) Controller() *controllerservice.Service

Controller returns the controller service.

func (*ControllerServices) ControllerConfig

ControllerConfig returns the controller configuration service.

func (*ControllerServices) ControllerNode

func (s *ControllerServices) ControllerNode() *controllernodeservice.Service

ControllerNode returns the controller node service.

func (*ControllerServices) Credential

Credential returns the credential service.

func (*ControllerServices) ExternalController

ExternalController returns the external controller service.

func (*ControllerServices) Flag

Flag returns the flag service.

func (*ControllerServices) Macaroon

func (*ControllerServices) Model

Model returns the model service.

func (*ControllerServices) ModelDefaults

func (s *ControllerServices) ModelDefaults() *modeldefaultsservice.Service

ModelDefaults returns the model defaults service.

func (*ControllerServices) SecretBackend

func (*ControllerServices) Upgrade

Upgrade returns the upgrade service.

type ModelServices

type ModelServices struct {
	// contains filtered or unexported fields
}

ModelServices provides access to the services required by the apiserver.

func NewModelServices

func NewModelServices(
	modelUUID model.UUID,
	controllerDB changestream.WatchableDBFactory,
	modelDB changestream.WatchableDBFactory,
	providerFactory providertracker.ProviderFactory,
	objectStore objectstore.ModelObjectStoreGetter,
	storageRegistry corestorage.ModelStorageRegistryGetter,
	publicKeyImporter PublicKeyImporter,
	leaseManager lease.ModelLeaseManagerGetter,
	clock clock.Clock,
	logger logger.Logger,
) *ModelServices

NewModelServices returns a new registry which uses the provided modelDB function to obtain a model database.

func (*ModelServices) Agent

Agent returns the model's agent service.

func (*ModelServices) AgentProvisioner

func (s *ModelServices) AgentProvisioner() *agentprovisionerservice.Service

AgentProvisioner returns the agent provisioner service.

func (*ModelServices) Annotation

func (s *ModelServices) Annotation() *annotationService.Service

Annotation returns the model's annotation service.

func (*ModelServices) Application

Application returns the model's application service.

func (*ModelServices) BlockCommand

func (s *ModelServices) BlockCommand() *blockcommandservice.Service

BlockCommand returns the service for blocking commands.

func (*ModelServices) BlockDevice

BlockDevice returns the model's block device service.

func (*ModelServices) CloudImageMetadata

func (s *ModelServices) CloudImageMetadata() *cloudimagemetadataservice.Service

CloudImageMetadata returns the service for persisting and retrieving cloud image metadata for the current model.

func (*ModelServices) Config

Config returns the model's configuration service.

func (*ModelServices) KeyManager

func (s *ModelServices) KeyManager() *keymanagerservice.Service

KeyManager returns the model's user public ssh key manager. Use this service when wanting to modify a user's public ssh keys within a model.

func (*ModelServices) KeyManagerWithImporter

func (s *ModelServices) KeyManagerWithImporter() *keymanagerservice.ImporterService

KeyManagerWithImporter returns the model's user public ssh key manager with the ability to import ssh public keys from external sources. Use this service when wanting to modify a user's public ssh keys within a model.

func (*ModelServices) KeyUpdater

KeyUpdater returns the model's key updater service. Use this service when wanting to retrieve the authorised ssh public keys for a model.

func (*ModelServices) Machine

Machine returns the model's machine service.

func (*ModelServices) ModelInfo

func (s *ModelServices) ModelInfo() *modelservice.ModelService

ModelInfo returns the model info service.

func (*ModelServices) ModelMigration

func (s *ModelServices) ModelMigration() *modelmigrationservice.Service

ModelMigration returns the model's migration service for supporting migration operations.

func (*ModelServices) ModelSecretBackend

ModelSecretBackend returns the model secret backend service.

func (*ModelServices) Network

Network returns the model's network service.

func (*ModelServices) Port

Port returns the service for managing opened port ranges for units.

func (*ModelServices) Proxy

func (s *ModelServices) Proxy() *proxy.Service

Proxy returns the proxy service.

func (*ModelServices) Relation

Relation returns the service for persisting and retrieving relations for the current model.

func (*ModelServices) Removal

Removal returns the service for working with entity removals in the current model.

func (*ModelServices) Resource

func (s *ModelServices) Resource() *resourceservice.Service

Resource returns the service for persisting and retrieving application resources for the current model.

func (*ModelServices) Secret

Secret returns the model's secret service.

func (*ModelServices) Storage

func (s *ModelServices) Storage() *storageservice.Service

Storage returns the model's storage service.

func (*ModelServices) Stub deprecated

Stub returns the stub service. A special service which collects temporary methods required to wire together domains which are not completely implemented or wired up.

*** ADD NEW METHODS ABOVE THIS, NOT BELOW.

Deprecated: Stub service contains only temporary methods and should be removed as soon as possible.

func (*ModelServices) UnitState

func (s *ModelServices) UnitState() *unitstateservice.Service

UnitState returns the service for persisting and retrieving remote unit state. This is used to reconcile with local state to determine which hooks to run, and is saved upon hook completion.

type ObjectStoreServices

type ObjectStoreServices struct {
	// contains filtered or unexported fields
}

ObjectStoreServices provides access to the services required by the apiserver.

func NewObjectStoreServices

func NewObjectStoreServices(
	controllerDB changestream.WatchableDBFactory,
	modelDB changestream.WatchableDBFactory,
	logger logger.Logger,
) *ObjectStoreServices

NewObjectStoreServices returns a new set of services for the usage of the object store.

func (*ObjectStoreServices) AgentObjectStore

AgentObjectStore returns the object store service.

func (*ObjectStoreServices) ControllerConfig

ControllerConfig returns the controller configuration service.

func (*ObjectStoreServices) ObjectStore

ObjectStore returns the model's object store service.

type ProviderServices

type ProviderServices struct {
	// contains filtered or unexported fields
}

ProviderServices provides access to the services required by the apiserver.

func NewProviderServices

func NewProviderServices(
	controllerDB changestream.WatchableDBFactory,
	modelDB changestream.WatchableDBFactory,
	logger logger.Logger,
) *ProviderServices

NewProviderServices returns a new registry which uses the provided db function to obtain a model database.

func (*ProviderServices) Cloud

Cloud returns the provider cloud service.

func (*ProviderServices) Config

Config returns the provider model config service.

func (*ProviderServices) Credential

Credential returns the provider credential service.

func (*ProviderServices) Model

Model returns the provider model service.

type PublicKeyImporter

type PublicKeyImporter interface {
	// FetchPublicKeysForSubject is responsible for gathering all of the
	// public keys available for a specified subject.
	// The following errors can be expected:
	// - [importererrors.NoResolver] when there is import resolver the subject
	// schema.
	// - [importerrors.SubjectNotFound] when the resolver has reported that no
	// subject exists.
	FetchPublicKeysForSubject(context.Context, *url.URL) ([]string, error)
}

PublicKeyImporter describes a service that is capable of fetching and providing public keys for a subject from a set of well known sources that don't need to be understood by this service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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