MCPcopy Create free account
hub / github.com/codealong-dev/ride-sharing / DefaultConfig

Function DefaultConfig

shared/retry/retry.go:20–26  ·  view source on GitHub ↗

DefaultConfig returns a Config with sensible default values

()

Source from the content-addressed store, hash-verified

18
19// DefaultConfig returns a Config with sensible default values
20func DefaultConfig() Config {
21 return Config{
22 MaxRetries: 3,
23 InitialWait: 1 * time.Second,
24 MaxWait: 10 * time.Second,
25 }
26}
27
28// WithBackoff executes the given operation with exponential backoff retry logic
29func WithBackoff(ctx context.Context, cfg Config, operation func() error) error {

Callers 1

ConsumeMessagesMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected