package backoff
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/backoff"
Index ¶
- Variables
- func Delay(t Type, i int, opts ...delayOption) time.Duration
- func New(opts ...option) logBackoff
- func WithCeiling(ceiling uint) option
- func WithFastBackoff(fast Backoff) delayOption
- func WithJitterLimit(jitterLimit float64) option
- func WithSeed(seed int64) option
- func WithSlotDuration(slotDuration time.Duration) option
- func WithSlowBackoff(slow Backoff) delayOption
- type Backoff
- type Type
Variables ¶
var ( Fast = New( WithSlotDuration(fastSlot), WithCeiling(6), ) Slow = New( WithSlotDuration(slowSlot), WithCeiling(6), ) )
Functions ¶
func Delay ¶
func New ¶
func New(opts ...option) logBackoff
func WithCeiling ¶
func WithCeiling(ceiling uint) option
func WithFastBackoff ¶
func WithFastBackoff(fast Backoff) delayOption
func WithJitterLimit ¶
func WithJitterLimit(jitterLimit float64) option
func WithSeed ¶
func WithSeed(seed int64) option
func WithSlotDuration ¶
func WithSlowBackoff ¶
func WithSlowBackoff(slow Backoff) delayOption
Types ¶
type Backoff ¶
Backoff is the interface that contains logic of delaying operation retry.
type Type ¶
type Type uint8
Type reports how to Backoff operation
Binary flags that used as Type
func (Type) String ¶
Source Files ¶
- Version
- v3.97.0
- Published
- Jan 16, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 minute ago –
Tools for package owners.