v1

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_middleware_bbr_v1_bbr_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BBR

type BBR struct {
	Bucket       int32                `protobuf:"varint,1,opt,name=bucket,proto3" json:"bucket,omitempty"`                                 // 每个窗口的桶的数量,默认100
	CpuQuota     float64              `protobuf:"fixed64,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"`            // cpu额度
	CpuThreshold int64                `protobuf:"varint,3,opt,name=cpu_threshold,json=cpuThreshold,proto3" json:"cpu_threshold,omitempty"` // cpu使用率阈值, 范围0-1000,默认 800
	Window       *durationpb.Duration `protobuf:"bytes,4,opt,name=window,proto3" json:"window,omitempty"`                                  // 每个窗口的持续时间,单位:ms,默认 10s
	// contains filtered or unexported fields
}

限流中间件配置

func (*BBR) Descriptor deprecated

func (*BBR) Descriptor() ([]byte, []int)

Deprecated: Use BBR.ProtoReflect.Descriptor instead.

func (*BBR) GetBucket

func (x *BBR) GetBucket() int32

func (*BBR) GetCpuQuota

func (x *BBR) GetCpuQuota() float64

func (*BBR) GetCpuThreshold

func (x *BBR) GetCpuThreshold() int64

func (*BBR) GetWindow

func (x *BBR) GetWindow() *durationpb.Duration

func (*BBR) ProtoMessage

func (*BBR) ProtoMessage()

func (*BBR) ProtoReflect

func (x *BBR) ProtoReflect() protoreflect.Message

func (*BBR) Reset

func (x *BBR) Reset()

func (*BBR) String

func (x *BBR) String() string

Jump to

Keyboard shortcuts

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