juju: github.com/juju/juju/apiserver/facades/agent/caasoperator Index | Files

package caasoperator

import "github.com/juju/juju/apiserver/facades/agent/caasoperator"


Package Files

operator.go state.go watcher.go

type Application Uses

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 CAASBrokerInterface Uses

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

type CAASOperatorState Uses

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

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

type Charm Uses

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 Uses

type Facade struct {
    // contains filtered or unexported fields

func NewFacade Uses

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

NewFacade returns a new CAASOperator facade.

func NewStateFacade Uses

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

NewStateFacade provides the signature required for facade registration.

func (*Facade) Charm Uses

func (f *Facade) Charm(args params.Entities) (params.ApplicationCharmResults, error)

Charm returns the charm info for all given applications.

func (*Facade) CurrentModel Uses

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

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

func (*Facade) SetPodSpec Uses

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 Uses

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

SetStatus sets the status of each given entity.

func (*Facade) WatchContainerStart Uses

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 Uses

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 Uses

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 Uses

type Unit interface {
    Tag() names.Tag

Package caasoperator imports 20 packages (graph) and is imported by 4 packages. Updated 2020-09-01. Refresh now. Tools for package owners.