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

package restorewatcher

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


Package Files

manifold.go shim.go worker.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold that will run a restorewatcher.

type Config Uses

type Config struct {
    RestoreInfoWatcher RestoreInfoWatcher

Config holds the worker configuration.

func (Config) Validate Uses

func (config Config) Validate() error

Validate validates the worker configuration.

type ManifoldConfig Uses

type ManifoldConfig struct {
    StateName string
    NewWorker func(Config) (RestoreStatusWorker, error)

ManifoldConfig holds the information necessary to run a restorewatcher in a dependency.Engine.

func (ManifoldConfig) Validate Uses

func (config ManifoldConfig) Validate() error

Validate validates the manifold configuration.

type RestoreInfoWatcher Uses

type RestoreInfoWatcher interface {
    WatchRestoreInfoChanges() state.NotifyWatcher
    RestoreStatus() (state.RestoreStatus, error)

RestoreInfoWatcher is an interface for watching and obtaining the restore info/status.

type RestoreInfoWatcherShim Uses

type RestoreInfoWatcherShim struct {

func (RestoreInfoWatcherShim) RestoreStatus Uses

func (r RestoreInfoWatcherShim) RestoreStatus() (state.RestoreStatus, error)

type RestoreStatusWorker Uses

type RestoreStatusWorker interface {

    // RestoreStatus returns the most recently observed restore status.
    RestoreStatus() state.RestoreStatus

RestoreStatusWorker is a worker that provides a means of observing the restore status.

func NewWorker Uses

func NewWorker(config Config) (RestoreStatusWorker, error)

NewWorker returns a new worker that watches for changes to restore info, and reports the status to the provided function.

Package restorewatcher imports 7 packages (graph) and is imported by 4 packages. Updated 2020-07-25. Refresh now. Tools for package owners.