package ratelimiter

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

Index

Types

type Client

type Client interface {
	closer.Closer

	CreateResource(
		ctx context.Context,
		coordinationNodePath string,
		resource Resource,
	) (err error)
	AlterResource(
		ctx context.Context,
		coordinationNodePath string,
		resource Resource,
	) (err error)
	DropResource(
		ctx context.Context,
		coordinationNodePath string,
		resourcePath string,
	) (err error)
	ListResource(
		ctx context.Context,
		coordinationNodePath string,
		resourcePath string,
		recursive bool,
	) (_ []string, err error)
	DescribeResource(
		ctx context.Context,
		coordinationNodePath string,
		resourcePath string,
	) (_ *Resource, err error)
	AcquireResource(
		ctx context.Context,
		coordinationNodePath string,
		resourcePath string,
		amount uint64,
		isUsedAmount bool,
	) (err error)
}

type HierarchicalDrrSettings

type HierarchicalDrrSettings struct {
	MaxUnitsPerSecond       float64
	MaxBurstSizeCoefficient float64
	PrefetchCoefficient     float64
	PrefetchWatermark       float64
}

type Resource

type Resource struct {
	ResourcePath    string
	HierarchicalDrr HierarchicalDrrSettings
}

Source Files

ratelimiter.go resource.go

Version
v3.9.3
Published
Feb 10, 2022
Platform
windows/amd64
Imports
2 packages
Last checked
10 minutes ago

Tools for package owners.