budget

package
v3.95.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoQuota is a special error for no quota provided by external retry budget
	//
	// Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
	ErrNoQuota = xerrors.Wrap(errors.New("no retry quota"))
)

Functions

func Limited

func Limited(attemptsPerSecond int, opts ...fixedBudgetOption) *fixedBudget

Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental

Types

type Budget

type Budget interface {
	// Acquire will called on second and subsequent retry attempts
	Acquire(ctx context.Context) error
}

Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental

Jump to

Keyboard shortcuts

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