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.103.0
Published
Mar 14, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
1 hour ago

Tools for package owners.