juju: github.com/juju/juju/worker/caasmodeloperator Index | Files

package caasmodeloperator

import "github.com/juju/juju/worker/caasmodeloperator"

Index

Package Files

manifold.go modeloperator.go

Constants

const (
    // DefaultModelOperatorPort is the default port used for the api server on
    // the model operator
    DefaultModelOperatorPort = 17071
)

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a Manifold that encapsulates a Kubernetes model operator.

type Logger Uses

type Logger interface {
    Debugf(string, ...interface{})
}

Logger is the interface this work requires for logging.

type ManifoldConfig Uses

type ManifoldConfig struct {
    // AgentName
    AgentName string
    // APICallerName is the name of the api caller dependency to fetch
    APICallerName string
    // BrokerName is the name of the api caller dependency to fetch
    BrokerName string
    // Logger to use in this worker
    Logger Logger
    // ModelUUID is the id of the model this worker is operating on
    ModelUUID string
}

ManifoldConfig describes the resources used by the CAASModelOperatorWorker

func (ManifoldConfig) Start Uses

func (m ManifoldConfig) Start(context dependency.Context) (worker.Worker, error)

Start is used to start the manifold an extract a worker from the supplied configuration

func (ManifoldConfig) Validate Uses

func (m ManifoldConfig) Validate() error

Validate checks all the config fields are valid for the Manifold to start

type ModelOperatorAPI Uses

type ModelOperatorAPI interface {
    SetPassword(password string) error
    ModelOperatorProvisioningInfo() (caasmodeloperator.ModelOperatorProvisioningInfo, error)
}

type ModelOperatorBroker Uses

type ModelOperatorBroker interface {
    EnsureModelOperator(string, string, *caas.ModelOperatorConfig) error
    ModelOperator() (*caas.ModelOperatorConfig, error)
    ModelOperatorExists() (bool, error)
}

ModelOperatorBroker describes the caas broker interface needed for installing a ModelOperator into Kubernetes

type ModelOperatorManager Uses

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

ModelOperatorManager defines the worker used for managing model operators in caas

func NewModelOperatorManager Uses

func NewModelOperatorManager(
    logger Logger,
    api ModelOperatorAPI,
    broker ModelOperatorBroker,
    modelUUID string,
    agentConfig agent.Config,
) (*ModelOperatorManager, error)

NewModelOperatorManager constructs a new model operator manager worker

func (*ModelOperatorManager) Kill Uses

func (m *ModelOperatorManager) Kill()

Kill implements worker kill method

func (*ModelOperatorManager) Wait Uses

func (m *ModelOperatorManager) Wait() error

Wait implements worker Wait method

Package caasmodeloperator imports 11 packages (graph) and is imported by 2 packages. Updated 2020-06-17. Refresh now. Tools for package owners.