Documentation
¶
Overview ¶
Package tc plans ownership-safe traffic-control netem operations.
Index ¶
Constants ¶
View Source
const ( // PumbaRootHandle identifies a qdisc tree owned by Pumba. It is deliberately // unusual so Pumba never mistakes a user-managed qdisc for its own state. PumbaRootHandle = "504d:" )
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(r *NetemRequest) []string
Start returns arguments for `sh -ec` that inspect the root qdisc before any mutation and install only Pumba-owned qdiscs. A foreign root fails closed.
func Stop ¶
func Stop(r *NetemRequest) []string
Stop returns arguments for `sh -ec` that verify Pumba ownership before cleanup. An absent/default qdisc has no Pumba state and succeeds.
Types ¶
type NetemRequest ¶
type NetemRequest struct {
Interface string
Command []string
IPs []string
SPorts []string
DPorts []string
}
NetemRequest contains the tc-specific portion of a netem request.
func (*NetemRequest) HasFilters ¶
func (r *NetemRequest) HasFilters() bool
HasFilters reports whether this request needs Pumba's scoped prio topology.
Click to show internal directories.
Click to hide internal directories.