Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cfg ¶ added in v0.11.0
func (*Cfg) UnmarshalJSON ¶ added in v0.11.0
func (*Cfg) UnmarshalYAML ¶ added in v0.11.0
type FixedRateLimiter ¶
type FixedRateLimiter struct {
runner.Runner
*FixedRateLimiterCfg
// contains filtered or unexported fields
}
func NewFixedRateLimiter ¶
func NewFixedRateLimiter() *FixedRateLimiter
func (*FixedRateLimiter) Init ¶
func (frl *FixedRateLimiter) Init() error
func (*FixedRateLimiter) SetRxLimit ¶ added in v0.11.37
func (frl *FixedRateLimiter) SetRxLimit(n int, burst int)
func (*FixedRateLimiter) SetTxLimit ¶ added in v0.11.37
func (frl *FixedRateLimiter) SetTxLimit(n int, burst int)
type FixedRateLimiterCfg ¶
func NewFixedRateLimiterCfg ¶
func NewFixedRateLimiterCfg() *FixedRateLimiterCfg
type HostRateLimiter ¶
type HostRateLimiter struct {
runner.Runner
*HostRateLimiterCfg
// contains filtered or unexported fields
}
func NewHostRateLimiter ¶
func NewHostRateLimiter() *HostRateLimiter
func (*HostRateLimiter) Init ¶
func (h *HostRateLimiter) Init() error
type HostRateLimiterCfg ¶
type HostRateLimiterCfg struct {
Nic string `json:"nic" validate:"required" yaml:"nic"`
MonitorInterval int `json:"monitorInterval" yaml:"monitorInterval"`
ReservePercent int `json:"reservePercent" yaml:"reservePercent"`
MinMBps int `json:"minMBps" yaml:"minMBps"`
Burst int `json:"burst" yaml:"burst"`
}
func NewHostRateLimiterCfg ¶
func NewHostRateLimiterCfg() *HostRateLimiterCfg
type RxTxRateLimiter ¶
type SleepRateLimiter ¶
type SleepRateLimiter struct {
runner.Runner
*SleepRateLimiterCfg
}
func NewSleepRateLimiter ¶
func NewSleepRateLimiter() *SleepRateLimiter
func (*SleepRateLimiter) Init ¶
func (srl *SleepRateLimiter) Init() error
type SleepRateLimiterCfg ¶
type SleepRateLimiterCfg struct {
Millisecond int
}
func NewSleepRateLimiterCfg ¶
func NewSleepRateLimiterCfg() *SleepRateLimiterCfg
Click to show internal directories.
Click to hide internal directories.