caasoperator

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Charm() (Charm, bool, error)
	CharmModifiedVersion() int
	SetOperatorStatus(status.StatusInfo) error
	WatchUnits() state.StringsWatcher
}

Application provides the subset of application state required by the CAAS operator facade.

type CAASBrokerInterface

type CAASBrokerInterface interface {
	WatchContainerStart(appName string, containerName string) (corewatcher.StringsWatcher, error)
}

type CAASControllerState

type CAASControllerState interface {
	Addresses() ([]string, error)
	ModelUUID() string
	WatchAPIHostPortsForAgents() state.NotifyWatcher
	APIHostPortsForAgents() ([]network.SpaceHostPorts, error)
}

CAASControllerState provides the subset of controller state required by the CAAS operator facade.

type CAASOperatorState

type CAASOperatorState interface {
	Application(string) (Application, error)
	Model() (Model, error)
	FindEntity(names.Tag) (state.Entity, error)
}

CAASOperatorState provides the subset of model state required by the CAAS operator facade.

type Charm

type Charm interface {
	URL() *charm.URL
	BundleSha256() string
	Meta() *charm.Meta
}

Charm provides the subset of charm state required by the CAAS operator facade.

type Facade

type Facade struct {
	*common.LifeGetter
	*common.AgentEntityWatcher
	*common.Remover
	*common.ToolsSetter
	*common.APIAddresser
	// contains filtered or unexported fields
}

Facade is the CAAS operator API facade.

func NewFacade

func NewFacade(
	resources facade.Resources,
	authorizer facade.Authorizer,
	ctrlSt CAASControllerState,
	st CAASOperatorState,
	appGetter unitcommon.ApplicationGetter,
	broker CAASBrokerInterface,
	leadershipRevoker leadership.Revoker,
) (*Facade, error)

NewFacade returns a new CAASOperator facade.

func NewStateFacade

func NewStateFacade(ctx facade.Context) (*Facade, error)

NewStateFacade provides the signature required for facade registration.

func (*Facade) Charm

Charm returns the charm info for all given applications.

func (*Facade) CurrentModel

func (f *Facade) CurrentModel() (params.ModelResult, error)

CurrentModel returns the name and UUID for the current juju model.

func (*Facade) ModelUUID

func (f *Facade) ModelUUID() params.StringResult

ModelUUID returns the model UUID that this facade is used to operate. It is implemented here directly as a result of removing it from embedded APIAddresser *without* bumping the facade version. It should be blanked when this facade version is next incremented.

func (*Facade) SetPodSpec

func (f *Facade) SetPodSpec(args params.SetPodSpecParams) (params.ErrorResults, error)

SetPodSpec sets the container specs for a set of applications. TODO(juju3) - remove

func (*Facade) SetStatus

func (f *Facade) SetStatus(args params.SetStatus) (params.ErrorResults, error)

SetStatus sets the status of each given entity.

func (*Facade) WatchContainerStart

func (f *Facade) WatchContainerStart(args params.WatchContainerStartArgs) (params.StringsWatchResults, error)

WatchContainerStart starts a StringWatcher to watch for container start events on the CAAS api for a specific application and container.

func (*Facade) WatchUnits

func (f *Facade) WatchUnits(args params.Entities) (params.StringsWatchResults, error)

WatchUnits starts a StringsWatcher to watch changes to the lifecycle states of units for the specified applications in this model.

type Model

type Model interface {
	SetPodSpec(leadership.Token, names.ApplicationTag, *string) error
	Name() string
	UUID() string
	Type() state.ModelType
	ModelConfig() (*config.Config, error)
	Containers(providerIds ...string) ([]state.CloudContainer, error)
}

Model provides the subset of CAAS model state required by the CAAS operator facade.

type Unit

type Unit interface {
	Tag() names.Tag
}

Jump to

Keyboard shortcuts

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