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

package externalcontrollerupdater

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

Index

Package Files

externalcontrollerupdater.go manifold.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a Manifold that runs an externalcontrollerupdater worker.

func New Uses

func New(
    externalControllers ExternalControllerUpdaterClient,
    newExternalControllerWatcherClient NewExternalControllerWatcherClientFunc,
    clock clock.Clock,
) (worker.Worker, error)

New returns a new external controller updater worker.

type ExternalControllerUpdaterClient Uses

type ExternalControllerUpdaterClient interface {
    WatchExternalControllers() (watcher.StringsWatcher, error)
    ExternalControllerInfo(controllerUUID string) (*crossmodel.ControllerInfo, error)
    SetExternalControllerInfo(crossmodel.ControllerInfo) error
}

ExternalControllerWatcherClient defines the interface for watching changes to the local controller's external controller records, and obtaining and updating their values. This will communicate only with the local controller.

type ExternalControllerWatcherClient Uses

type ExternalControllerWatcherClient interface {
    WatchControllerInfo() (watcher.NotifyWatcher, error)
    ControllerInfo() (*crosscontroller.ControllerInfo, error)
}

ExternalControllerWatcherClient defines the interface for watching changes to and obtaining the current API information for a controller. This will communicate with an external controller.

type ExternalControllerWatcherClientCloser Uses

type ExternalControllerWatcherClientCloser interface {
    ExternalControllerWatcherClient
    io.Closer
}

ExternalControllerWatcherClientCloser extends the ExternalControllerWatcherClient interface with a Close method, for closing the API connection associated with the client.

type ManifoldConfig Uses

type ManifoldConfig struct {
    APICallerName string

    NewExternalControllerWatcherClient NewExternalControllerWatcherClientFunc
}

ManifoldConfig describes the resources used by an externalcontrollerupdater worker.

func (ManifoldConfig) Validate Uses

func (cfg ManifoldConfig) Validate() error

Validate validates the manifold configuration.

type NewExternalControllerWatcherClientFunc Uses

type NewExternalControllerWatcherClientFunc func(*api.Info) (ExternalControllerWatcherClientCloser, error)

NewExternalControllerWatcherClientFunc is a function type that returns an ExternalControllerWatcherClientCloser, given an *api.Info. The api.Info should be for making a controller-only connection to a remote/external controller.

Package externalcontrollerupdater imports 16 packages (graph) and is imported by 3 packages. Updated 2019-09-17. Refresh now. Tools for package owners.