juju: github.com/juju/juju/apiserver/facades/controller/undertaker Index | Files

package undertaker

import "github.com/juju/juju/apiserver/facades/controller/undertaker"

Index

Package Files

state.go undertaker.go

type Model Uses

type Model interface {

    // Owner returns tag representing the owner of the model.
    // The owner is the user that created the model.
    Owner() names.UserTag

    // Life returns whether the model is Alive, Dying or Dead.
    Life() state.Life

    // ForceDestroyed returns whether the dying/dead model was
    // destroyed with --force. Always false for alive models.
    ForceDestroyed() bool

    // Name returns the human friendly name of the model.
    Name() string

    // UUID returns the universally unique identifier of the model.
    UUID() string
}

Model defines the needed methods of state.Model for the work of the undertaker API.

type State Uses

type State interface {
    state.EntityFinder

    // Model returns the model entity.
    Model() (Model, error)

    // IsController returns true if this state instance has the bootstrap
    // model UUID.
    IsController() bool

    // ProcessDyingModel checks if there are any machines or services left in
    // state. If there are none, the model's life is changed from dying to dead.
    ProcessDyingModel() (err error)

    // RemoveDyingModel sets current model to dead then removes all documents from
    // multi-model collections.
    RemoveDyingModel() error

    // ModelConfig retrieves the model configuration.
    ModelConfig() (*config.Config, error)

    // WatchModelEntityReferences gets a watcher capable of monitoring
    // model entity references changes.
    WatchModelEntityReferences(mUUID string) state.NotifyWatcher

    // ModelUUID returns the model UUID for the model controlled
    // by this state instance.
    ModelUUID() string
}

State defines the needed methods of state.State for the work of the undertaker API.

type UndertakerAPI Uses

type UndertakerAPI struct {
    *common.StatusSetter
    // contains filtered or unexported fields
}

UndertakerAPI implements the API used by the model undertaker worker.

func NewUndertakerAPI Uses

func NewUndertakerAPI(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*UndertakerAPI, error)

NewUndertakerAPI creates a new instance of the undertaker API.

func (*UndertakerAPI) ModelConfig Uses

func (u *UndertakerAPI) ModelConfig() (params.ModelConfigResult, error)

ModelConfig returns the model's configuration.

func (*UndertakerAPI) ModelInfo Uses

func (u *UndertakerAPI) ModelInfo() (params.UndertakerModelInfoResult, error)

ModelInfo returns information on the model needed by the undertaker worker.

func (*UndertakerAPI) ProcessDyingModel Uses

func (u *UndertakerAPI) ProcessDyingModel() error

ProcessDyingModel checks if a dying model has any machines or applications. If there are none, the model's life is changed from dying to dead.

func (*UndertakerAPI) RemoveModel Uses

func (u *UndertakerAPI) RemoveModel() error

RemoveModel removes any records of this model from Juju.

func (*UndertakerAPI) WatchModelResources Uses

func (u *UndertakerAPI) WatchModelResources() params.NotifyWatchResults

WatchModelResources creates watchers for changes to the lifecycle of an model's machines and services.

Package undertaker imports 8 packages (graph) and is imported by 3 packages. Updated 2019-08-26. Refresh now. Tools for package owners.