bbr

package
v0.0.50-alpha.111 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BBR

type BBR struct {
	// contains filtered or unexported fields
}

func NewBBRLimiter

func NewBBRLimiter(opts ...Option) *BBR

func (*BBR) Allow

func (l *BBR) Allow() (ratelimit.DoneFunc, error)

func (*BBR) Stat

func (l *BBR) Stat() Stat

type Option

type Option func(*options)

Option function for bbr limiter

func WithBucket

func WithBucket(bucket int) Option

func WithCPUQuota

func WithCPUQuota(quota float64) Option

func WithCPUThreshold

func WithCPUThreshold(threshold int64) Option

func WithWindow

func WithWindow(d time.Duration) Option

type Stat

type Stat struct {
	CPU         int64
	InFlight    int64
	MaxInFlight int64
	MinRt       int64
	MaxPass     int64
}

Jump to

Keyboard shortcuts

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