MCPcopy
hub / github.com/grafana/dskit / Err

Method Err

backoff/backoff.go:58–66  ·  view source on GitHub ↗

Err returns the reason for terminating the backoff, or nil if it didn't terminate.

()

Source from the content-addressed store, hash-verified

56
57// Err returns the reason for terminating the backoff, or nil if it didn't terminate.
58func (b *Backoff) Err() error {
59 if b.ctx.Err() != nil {
60 return b.ctx.Err()
61 }
62 if b.cfg.MaxRetries != 0 && b.numRetries >= b.cfg.MaxRetries {
63 return fmt.Errorf("terminated after %d retries", b.numRetries)
64 }
65 return nil
66}
67
68// ErrCause is like Err() but returns the context cause if backoff is terminated because the
69// context has been canceled.

Callers 15

ErrCauseMethod · 0.95
SetMethod · 0.45
AddMethod · 0.45
DeleteMethod · 0.45
incrDecrMethod · 0.45
TouchMethod · 0.45
CompareAndSwapMethod · 0.45
FlushAllMethod · 0.45
assertCorrectCleanupMethod · 0.45

Calls 1

ErrorfMethod · 0.80