juju: github.com/juju/juju/apiserver/facades/agent/retrystrategy Index | Files

package retrystrategy

import "github.com/juju/juju/apiserver/facades/agent/retrystrategy"


Package Files



const (
    MinRetryTime    = 5 * time.Second
    MaxRetryTime    = 5 * time.Minute
    JitterRetryTime = true
    RetryTimeFactor = 2

Right now, these are defined as constants, but the plan is to maybe make them configurable in the future

type RetryStrategy Uses

type RetryStrategy interface {
    RetryStrategy(params.Entities) (params.RetryStrategyResults, error)
    WatchRetryStrategy(params.Entities) (params.NotifyWatchResults, error)

RetryStrategy defines the methods exported by the RetryStrategy API facade.

type RetryStrategyAPI Uses

type RetryStrategyAPI struct {
    // contains filtered or unexported fields

RetryStrategyAPI implements RetryStrategy

func NewRetryStrategyAPI Uses

func NewRetryStrategyAPI(
    st *state.State,
    resources facade.Resources,
    authorizer facade.Authorizer,
) (*RetryStrategyAPI, error)

NewRetryStrategyAPI creates a new API endpoint for getting retry strategies.

func (*RetryStrategyAPI) RetryStrategy Uses

func (h *RetryStrategyAPI) RetryStrategy(args params.Entities) (params.RetryStrategyResults, error)

RetryStrategy returns RetryStrategyResults that can be used by any code that uses to configure the retry timer that's currently in juju utils.

func (*RetryStrategyAPI) WatchRetryStrategy Uses

func (h *RetryStrategyAPI) WatchRetryStrategy(args params.Entities) (params.NotifyWatchResults, error)

WatchRetryStrategy watches for changes to the model. Currently we only allow changes to the boolean that determines whether retries should be attempted or not.

Package retrystrategy imports 9 packages (graph) and is imported by 4 packages. Updated 2020-07-25. Refresh now. Tools for package owners.