Documentation ¶
Index ¶
- type RequestLimits
- func (r *RequestLimits) AddCounter(counterTime time.Time)
- func (r *RequestLimits) CleanCounters() *Requests
- func (r *RequestLimits) Marshal() ([]byte, error)
- func (r *RequestLimits) ToCommon() common.RequestLimitData
- func (r *RequestLimits) ToV2() *RequestLimitsV2
- func (r *RequestLimits) Unmarshal(data []byte) error
- type RequestLimitsV2
- type RequestLimitsV2Debug
- type Requests
- type RequestsV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestLimits ¶
type RequestLimits struct { WindowSeconds uint64 Requests *Requests `json:"requests_v2,omitempty"` Threshold uint64 }
func (*RequestLimits) AddCounter ¶
func (r *RequestLimits) AddCounter(counterTime time.Time)
func (*RequestLimits) CleanCounters ¶ added in v0.0.55
func (r *RequestLimits) CleanCounters() *Requests
func (*RequestLimits) Marshal ¶
func (r *RequestLimits) Marshal() ([]byte, error)
func (*RequestLimits) ToCommon ¶
func (r *RequestLimits) ToCommon() common.RequestLimitData
func (*RequestLimits) ToV2 ¶ added in v0.0.50
func (r *RequestLimits) ToV2() *RequestLimitsV2
func (*RequestLimits) Unmarshal ¶
func (r *RequestLimits) Unmarshal(data []byte) error
type RequestLimitsV2 ¶
type RequestLimitsV2 struct { WindowSeconds uint64 `json:"window_seconds"` RequestsCount uint32 `json:"requests_count"` Requests []RequestsV2 `json:"-"` Threshold uint64 `json:"threshold"` }
func (*RequestLimitsV2) AddCounter ¶ added in v0.1.14
func (r *RequestLimitsV2) AddCounter(counterTime time.Time)
func (*RequestLimitsV2) CleanCounters ¶ added in v0.1.14
func (r *RequestLimitsV2) CleanCounters() []RequestsV2
func (*RequestLimitsV2) Marshal ¶ added in v0.0.55
func (r *RequestLimitsV2) Marshal() ([]byte, error)
func (*RequestLimitsV2) Unmarshal ¶ added in v0.0.55
func (r *RequestLimitsV2) Unmarshal(data []byte) error
type RequestLimitsV2Debug ¶ added in v0.1.16
type RequestLimitsV2Debug struct { WindowSeconds uint64 `json:"window_seconds"` RequestsCount uint32 `json:"requests_count"` Requests []RequestsV2 `json:"requests"` Threshold uint64 `json:"threshold"` }
type RequestsV2 ¶
func (*RequestsV2) Marshal ¶ added in v0.0.55
func (r *RequestsV2) Marshal() ([]byte, error)
func (*RequestsV2) Unmarshal ¶ added in v0.0.55
func (r *RequestsV2) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.