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

package retrystrategy

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


Package Files

manifold.go shim.go worker.go

func Manifold Uses

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 Uses

func NewRetryStrategyWorker(config WorkerConfig) (worker.Worker, error)

NewRetryStrategyWorker returns a worker.Worker that returns the current retry strategy and bounces when it changes.

type Facade Uses

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.

func NewFacade Uses

func NewFacade(apiCaller base.APICaller) Facade

NewFacade creates a Facade from a base.APICaller. It's a sensible value for ManifoldConfig.NewFacade.

type ManifoldConfig Uses

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 Uses

type RetryStrategyWorker struct {
    // contains filtered or unexported fields

RetryStrategyWorker is a NotifyWorker with one additional method that returns the current retry strategy.

func (*RetryStrategyWorker) GetRetryStrategy Uses

func (w *RetryStrategyWorker) GetRetryStrategy() params.RetryStrategy

GetRetryStrategy returns the current hook retry strategy

type WorkerConfig Uses

type WorkerConfig struct {
    Facade        Facade
    AgentTag      names.Tag
    RetryStrategy params.RetryStrategy

WorkerConfig defines the worker's dependencies.

func (WorkerConfig) Validate Uses

func (c WorkerConfig) Validate() error

Validate returns an error if the configuration is not complete.

Package retrystrategy imports 10 packages (graph) and is imported by 27 packages. Updated 2019-09-14. Refresh now. Tools for package owners.