Home / Type/ Duration Type — fiber Architecture

Duration Type — fiber Architecture

Architecture documentation for the Duration type/interface in config.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  021bbaaa_e020_8d41_f9f8_6ef156a3253c["Duration"]
  375cf52c_a275_c066_8b6b_9b79f51587e5["config.go"]
  021bbaaa_e020_8d41_f9f8_6ef156a3253c -->|defined in| 375cf52c_a275_c066_8b6b_9b79f51587e5
  style 021bbaaa_e020_8d41_f9f8_6ef156a3253c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

addon/retry/config.go lines 8–35

type Config struct {
	// InitialInterval defines the initial time interval for backoff algorithm.
	//
	// Optional. Default: 1 * time.Second
	InitialInterval time.Duration

	// MaxBackoffTime defines maximum time duration for backoff algorithm. When
	// the algorithm is reached this time, rest of the retries will be maximum
	// 32 seconds.
	//
	// Optional. Default: 32 * time.Second
	MaxBackoffTime time.Duration

	// Multiplier defines multiplier number of the backoff algorithm.
	//
	// Optional. Default: 2.0
	Multiplier float64

	// MaxRetryCount defines maximum retry count for the backoff algorithm.
	//
	// Optional. Default: 10
	MaxRetryCount int

	// currentInterval tracks the current waiting time.
	//
	// Optional. Default: 1 * time.Second
	currentInterval time.Duration
}

Frequently Asked Questions

What is the Duration type?
Duration is a type/interface in the fiber codebase, defined in addon/retry/config.go.
Where is Duration defined?
Duration is defined in addon/retry/config.go at line 8.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free