recovery

package
v0.58.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, newBackoff func() backoff.BackOff) telegram.Middleware

New returns a recovery middleware.

newBackoff is a factory that must return a fresh backoff.BackOff on every call: backoff implementations in cenkalti/backoff/v4 (notably ExponentialBackOff) are not safe for concurrent use, and the Telegram client invokes RPCs from many goroutines in parallel.

Sharing a single instance corrupts its internal counters, breaks the exponential interval, and defeats MaxElapsedTime - see issue #218.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL