cloud

package
v0.0.0-...-0320863 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RetryConfig

type RetryConfig struct {
	// MaxRetries is the maximum number of additional attempts after the initial failure.
	// For example, if MaxRetries is 3, the operation runs at most 4 times (1 initial + 3 retries).
	MaxRetries int

	// BaseDelay is the initial wait time before the first retry.
	// This duration increases exponentially with each attempt (BaseDelay * 2^attempt).
	BaseDelay time.Duration

	// MaxDelay is the hard limit for the sleep duration between retries.
	// Even if the exponential calculation exceeds this value, the wait time will be capped here.
	MaxDelay time.Duration

	// OperationTimeout is the total time limit for the entire operation, including all retries.
	// If this timeout is reached, the context will be cancelled regardless of retry attempts left.
	OperationTimeout time.Duration
}

RetryConfig defines the parameters for the exponential backoff and retry mechanism. It allows fine-tuning of how aggressive the system should be when handling transient errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL