Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBBRServiceOverload = errors.New("service overload with bbr")
)
View Source
var ErrUnknownPeriodCode = errors.New("unknown period code")
Functions ¶
This section is empty.
Types ¶
type BBR ¶
type BBR struct {
// contains filtered or unexported fields
}
BBR Bottleneck Bandwidth and RTT
func NewBBR ¶
func NewBBR(options ...BBROptionFn) *BBR
type BBROptionFn ¶
type BBROptionFn func(*bbrOption)
func WithBBRBucket ¶
func WithBBRBucket(buckets int) BBROptionFn
func WithBBRCpuThreshold ¶
func WithBBRCpuThreshold(threshold int64) BBROptionFn
func WithBBRWindow ¶
func WithBBRWindow(window time.Duration) BBROptionFn
type Period ¶
type Period struct {
// contains filtered or unexported fields
}
type PeriodCode ¶
type PeriodCode int
const ( PeriodUnknown PeriodCode = iota PeriodAllowed PeriodHitQuota PeriodOverQuota )
type PeriodOption ¶
type PeriodOption func(p *Period)
func WithPeriodAlign ¶
func WithPeriodAlign() PeriodOption
func WithPeriodPrefix ¶
func WithPeriodPrefix(prefix string) PeriodOption
Click to show internal directories.
Click to hide internal directories.