package budget

import "github.com/ydb-platform/ydb-go-sdk/v3/retry/budget"

Index

Variables

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

func Percent

func Percent(percent int) *percentBudget

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

Source Files

budget.go errors.go

Version
v3.80.4
Published
Sep 16, 2024
Platform
js/wasm
Imports
7 packages
Last checked
7 minutes ago

Tools for package owners.