caasoperator

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 13 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
	AllUnits() ([]Unit, error)
}

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

type CAASOperatorState

type CAASOperatorState interface {
	Application(string) (Application, error)
	Model() (Model, error)
	ModelUUID() string
	FindEntity(names.Tag) (state.Entity, error)
	APIHostPortsForAgents() ([][]network.HostPort, error)
	Addresses() ([]string, error)
	WatchAPIHostPortsForAgents() state.NotifyWatcher
}

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

type Charm

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

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
}

func NewFacade

func NewFacade(
	resources facade.Resources,
	authorizer facade.Authorizer,
	st CAASOperatorState,
) (*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) SetPodSpec

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

SetPodSpec sets the container specs for a set of applications.

func (*Facade) SetStatus

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

SetStatus sets the status of each given entity.

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(names.ApplicationTag, string) error
	Name() string
	UUID() string
	Type() state.ModelType
	ModelConfig() (*config.Config, 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