Documentation
¶
Index ¶
- func DeleteAllQdisc(interfaceName string) error
- func GetQdiscList(interfaceName string) ([]netlink.Qdisc, error)
- func SetNetem(interfaceName string, delay uint32, loss float32, duplicate float32, ...) error
- func SetTbf(interfaceName string, bandwidth uint64, latencyInMillis float64) error
- type NetemArgs
- type NetemReply
- type ResetArgs
- type ResetReply
- type TbfArgs
- type TbfReply
- type TrafficControlService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAllQdisc ¶
delete all qdiscs attached to this interface
func GetQdiscList ¶
get all qdiscs of this interface
func SetNetem ¶
func SetNetem(interfaceName string, delay uint32, loss float32, duplicate float32, reorderProb float32, corruptProb float32) error
attach a Network Emulator qdisc to this network interface delay: millisecond loss: percentage duplicate: percentage reorderProb: percentage corruptProb: percentage
func SetTbf ¶
attach a token bucket filter qdisc to this network interface to limit its bandwidth bandwidth: rate in bytes/s latencyInMillis: latency in milliseconds referenced from https://github.com/AliyunContainerService/terway/blob/master/pkg/tc/tc.go
Types ¶
type NetemReply ¶
type NetemReply struct { }
type ResetReply ¶
type ResetReply struct { }
type TrafficControlService ¶
type TrafficControlService struct{}
func (*TrafficControlService) ResetRPC ¶
func (t *TrafficControlService) ResetRPC(r *http.Request, args *ResetArgs, reply *ResetReply) error
func (*TrafficControlService) SetNetemRPC ¶
func (t *TrafficControlService) SetNetemRPC(r *http.Request, args *NetemArgs, reply *NetemReply) error
Click to show internal directories.
Click to hide internal directories.