Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher is an implementation of an eager content fetcher.
type Option ¶
type Option func(*Fetcher)
Option set optional parameters for the Fetcher.
func WithClient ¶
func WithClient(client httpClient) Option
WithClient sets the http client for the Fetcher.
func WithRetry ¶
func WithRetry(cfg *RetryConfig) Option
WithRetry sets the retry configuration for the Fetcher.
type RetryConfig ¶
type RetryConfig struct { Attempts int MinInterval time.Duration MaxInterval time.Duration Factor time.Duration MaxJitterInterval time.Duration }
RetryConfig is the retry configuration for Fetcher.
func (RetryConfig) Validate ¶
func (cfg RetryConfig) Validate() error
Validate validates a RetryConfig and returns an error if validation is failed.
Click to show internal directories.
Click to hide internal directories.