Documentation
¶
Index ¶
- func Manifold(config ManifoldConfig) dependency.Manifold
- func New(externalControllers ExternalControllerUpdaterClient, ...) (worker.Worker, error)
- type ExternalControllerUpdaterClient
- type ExternalControllerWatcherClient
- type ExternalControllerWatcherClientCloser
- type ManifoldConfig
- type NewExternalControllerWatcherClientFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a Manifold that runs an externalcontrollerupdater worker.
func New ¶
func New( externalControllers ExternalControllerUpdaterClient, newExternalControllerWatcherClient NewExternalControllerWatcherClientFunc, clock clock.Clock, ) (worker.Worker, error)
New returns a new external controller updater worker.
Types ¶
type ExternalControllerUpdaterClient ¶
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 ¶
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 ¶
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 ¶
type ManifoldConfig struct {
APICallerName string
NewExternalControllerWatcherClient NewExternalControllerWatcherClientFunc
}
ManifoldConfig describes the resources used by an externalcontrollerupdater worker.
func (ManifoldConfig) Validate ¶
func (cfg ManifoldConfig) Validate() error
Validate validates the manifold configuration.
type NewExternalControllerWatcherClientFunc ¶
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.