Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrafficConfig ¶
type TrafficController ¶
type TrafficController struct {
// contains filtered or unexported fields
}
func NewTrafficController ¶
func NewTrafficController(cfg TrafficConfig) *TrafficController
func (*TrafficController) GetThroughput ¶
func (p *TrafficController) GetThroughput() uint8
func (*TrafficController) NewRWBucket ¶
func (p *TrafficController) NewRWBucket() ratelimiter.RWRateQuota
func (*TrafficController) SetLevel ¶
func (p *TrafficController) SetLevel(level capacity.Level)
func (*TrafficController) SetThroughput ¶
func (p *TrafficController) SetThroughput(percent uint8)
func (*TrafficController) Start ¶
func (p *TrafficController) Start(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.