caasapplication

package
v0.0.0-...-2f78cd6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: AGPL-3.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type Application

type Application interface {
	Life() state.Life
	Name() string
	UpsertCAASUnit(args state.UpsertCAASUnitParams) (Unit, error)
	GetScale() int
}

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

type Broker

type Broker interface {
	Application(string, caas.DeploymentType) caas.Application
}

Broker contains methods from the caas.Broker interface used by the caasapplication facade.

type Charm

type Charm interface {
	Meta() *charm.Meta
}

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

type ControllerState

type ControllerState interface {
	ControllerConfig() (jujucontroller.Config, error)
	APIHostPortsForAgents() ([]network.SpaceHostPorts, error)
}

ControllerState provides the subset of controller state required by the CAAS application facade.

type Facade

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

func NewFacade

func NewFacade(
	resources facade.Resources,
	authorizer facade.Authorizer,
	ctrlSt ControllerState,
	st State,
	broker Broker,
	clock clock.Clock,
) (*Facade, error)

NewFacade returns a new CAASOperator facade.

func (*Facade) UnitIntroduction

UnitIntroduction sets the status of each given entity.

func (*Facade) UnitTerminating

func (f *Facade) UnitTerminating(args params.Entity) (params.CAASUnitTerminationResult, error)

UnitTerminating should be called by the CAASUnitTerminationWorker when the agent receives a signal to exit. UnitTerminating will return how the agent should shutdown.

type Model

type Model interface {
	AgentVersion() (version.Number, error)
	ControllerTag() names.ControllerTag
	Tag() names.Tag
}

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

type State

type State interface {
	Application(string) (Application, error)
	Model() (Model, error)
	Unit(name string) (Unit, error)
}

State provides the subset of model state required by the CAAS application facade.

type Unit

type Unit interface {
	Tag() names.Tag
	ContainerInfo() (state.CloudContainer, error)
	Life() state.Life
	Refresh() error
	ApplicationName() string
}

Jump to

Keyboard shortcuts

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