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 runs a hook retry strategy worker, using the agent name and the api connection resources named in the supplied config.
func NewRetryStrategyWorker ¶
func NewRetryStrategyWorker(config WorkerConfig) (worker.Worker, error)
NewRetryStrategyWorker returns a worker.Worker that returns the current retry strategy and bounces when it changes.
Types ¶
type Facade ¶
type Facade interface { RetryStrategy(names.Tag) (params.RetryStrategy, error) WatchRetryStrategy(names.Tag) (watcher.NotifyWatcher, error) }
Facade defines the capabilities required by the worker from the API.
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string APICallerName string NewFacade func(base.APICaller) Facade NewWorker func(WorkerConfig) (worker.Worker, error) }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
type RetryStrategyWorker ¶
type RetryStrategyWorker struct { *watcher.NotifyWorker // contains filtered or unexported fields }
RetryStrategyWorker is a NotifyWorker with one additional method that returns the current retry strategy.
func (*RetryStrategyWorker) GetRetryStrategy ¶
func (w *RetryStrategyWorker) GetRetryStrategy() params.RetryStrategy
GetRetryStrategy returns the current hook retry strategy
type WorkerConfig ¶
type WorkerConfig struct { Facade Facade AgentTag names.Tag RetryStrategy params.RetryStrategy }
WorkerConfig defines the worker's dependencies.
func (WorkerConfig) Validate ¶
func (c WorkerConfig) Validate() error
Validate returns an error if the configuration is not complete.