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

Method ErrCause

backoff/backoff.go:70–75  ·  view source on GitHub ↗

ErrCause is like Err() but returns the context cause if backoff is terminated because the context has been canceled.

()

Source from the content-addressed store, hash-verified

68// ErrCause is like Err() but returns the context cause if backoff is terminated because the
69// context has been canceled.
70func (b *Backoff) ErrCause() error {
71 if b.ctx.Err() != nil {
72 return context.Cause(b.ctx)
73 }
74 return b.Err()
75}
76
77// NumRetries returns the number of retries so far
78func (b *Backoff) NumRetries() int {

Callers 1

Calls 1

ErrMethod · 0.95

Tested by 1