Skip to content

feat: claimsyncer: change retry policy for generic RetryPolicyGenericConfig #1544

@joanestebanr

Description

@joanestebanr

Feature Request

Instead of

// RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry
	RetryAfterErrorPeriod types.Duration `mapstructure:"RetryAfterErrorPeriod"`
	// MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicing.
	// Any number smaller than zero will be considered as unlimited retries
	MaxRetryAttemptsAfterError int `mapstructure:"MaxRetryAttemptsAfterError"`

Use

// RetriesPolicy is the configuration of maxRetries and delay between retries
	// that will be used for retrying operations in case of errors
	RetriesPolicy aggkitcommon.RetryPolicyGenericConfig `mapstructure:"RetriesToBuildAndSendCertificate"`	

rh, err := cfg.RetriesPolicy.NewRetryHandler()

Require to adapt downloader to use the interface

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions