Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency.Manifold that will run a restorewatcher.
Types ¶
type Config ¶
type Config struct {
RestoreInfoWatcher RestoreInfoWatcher
}
Config holds the worker configuration.
type ManifoldConfig ¶
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 ¶
func (config ManifoldConfig) Validate() error
Validate validates the manifold configuration.
type RestoreInfoWatcher ¶
type RestoreInfoWatcher interface { WatchRestoreInfoChanges() state.NotifyWatcher RestoreStatus() (state.RestoreStatus, error) }
RestoreInfoWatcher is an interface for watching and obtaining the restore info/status.
type RestoreInfoWatcherShim ¶
func (RestoreInfoWatcherShim) RestoreStatus ¶
func (r RestoreInfoWatcherShim) RestoreStatus() (state.RestoreStatus, error)
type RestoreStatusWorker ¶
type RestoreStatusWorker interface { worker.Worker // 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 ¶
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.
Click to show internal directories.
Click to hide internal directories.