pb

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthLimiter        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLimiter          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLimiter = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLimiters        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLimiters          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLimiters = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Limiter

type Limiter struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Rate                 int32    `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"`
	Interval             int64    `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewLimiter added in v1.0.3

func NewLimiter(name string, rate int, interval time.Duration) *Limiter

func (*Limiter) Descriptor

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

func (*Limiter) GetInterval

func (m *Limiter) GetInterval() int64

func (*Limiter) GetName

func (m *Limiter) GetName() string

func (*Limiter) GetRate

func (m *Limiter) GetRate() int32

func (*Limiter) IsValid added in v1.0.6

func (l *Limiter) IsValid() bool

func (*Limiter) Marshal

func (m *Limiter) Marshal() (dAtA []byte, err error)

func (*Limiter) MarshalTo

func (m *Limiter) MarshalTo(dAtA []byte) (int, error)

func (*Limiter) MarshalToSizedBuffer

func (m *Limiter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Limiter) ProtoMessage

func (*Limiter) ProtoMessage()

func (*Limiter) Reset

func (m *Limiter) Reset()

func (*Limiter) Size

func (m *Limiter) Size() (n int)

func (*Limiter) String

func (m *Limiter) String() string

func (*Limiter) Unmarshal

func (m *Limiter) Unmarshal(dAtA []byte) error

func (*Limiter) XXX_DiscardUnknown

func (m *Limiter) XXX_DiscardUnknown()

func (*Limiter) XXX_Marshal

func (m *Limiter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Limiter) XXX_Merge

func (m *Limiter) XXX_Merge(src proto.Message)

func (*Limiter) XXX_Size

func (m *Limiter) XXX_Size() int

func (*Limiter) XXX_Unmarshal

func (m *Limiter) XXX_Unmarshal(b []byte) error

type LimiterList

type LimiterList struct {
	List                 []*Limiter `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*LimiterList) Descriptor

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

func (*LimiterList) GetList

func (m *LimiterList) GetList() []*Limiter

func (*LimiterList) Marshal

func (m *LimiterList) Marshal() (dAtA []byte, err error)

func (*LimiterList) MarshalTo

func (m *LimiterList) MarshalTo(dAtA []byte) (int, error)

func (*LimiterList) MarshalToSizedBuffer

func (m *LimiterList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LimiterList) ProtoMessage

func (*LimiterList) ProtoMessage()

func (*LimiterList) Reset

func (m *LimiterList) Reset()

func (*LimiterList) Size

func (m *LimiterList) Size() (n int)

func (*LimiterList) String

func (m *LimiterList) String() string

func (*LimiterList) Unmarshal

func (m *LimiterList) Unmarshal(dAtA []byte) error

func (*LimiterList) XXX_DiscardUnknown

func (m *LimiterList) XXX_DiscardUnknown()

func (*LimiterList) XXX_Marshal

func (m *LimiterList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LimiterList) XXX_Merge

func (m *LimiterList) XXX_Merge(src proto.Message)

func (*LimiterList) XXX_Size

func (m *LimiterList) XXX_Size() int

func (*LimiterList) XXX_Unmarshal

func (m *LimiterList) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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