Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrModelCredentialChanged = errors.New("model cloud credential has changed")
ErrModelCredentialChanged indicates that a Worker has bounced because its model's cloud credential has changed.
View Source
var ErrValidityChanged = errors.New("cloud credential validity has changed")
ErrValidityChanged indicates that a Worker has bounced because its credential validity has changed: either a valid credential became invalid or invalid credential became valid.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold packages a Worker for use in a dependency.Engine.
Types ¶
type Facade ¶
type Facade interface {
// ModelCredential gets model's cloud credential.
// Models that are on the clouds that do not require auth will return
// false to signify that credential was not set.
ModelCredential() (base.StoredCredential, bool, error)
// WatchCredential gets cloud credential watcher.
WatchCredential(string) (watcher.NotifyWatcher, error)
// WatchModelCredential gets model's cloud credential watcher.
WatchModelCredential() (watcher.NotifyWatcher, error)
}
Facade exposes functionality required by a Worker to access and watch a cloud credential that a model uses.
type ManifoldConfig ¶
type ManifoldConfig struct {
APICallerName string
NewFacade func(base.APICaller) (Facade, error)
NewWorker func(Config) (worker.Worker, error)
Logger Logger
}
ManifoldConfig holds the dependencies and configuration for a Worker manifold.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate is called by start to check for bad configuration.
Click to show internal directories.
Click to hide internal directories.