Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// Up is the maximum upload speed. If not set, there is no limit.
// The value is parsed using the `go-humanize` package and accepts
// both the SI and the IEC prefixes. Values without units are interepreted
// as bytes.
Up string `json:"up,omitempty"`
// Down is the maximum upload speed. If not set, there is no limit.
// The value is parsed using the `go-humanize` package and accepts
// both the SI and the IEC prefixes. Values without units are interepreted
// as bytes.
Down string `json:"down,omitempty"`
// Latency adds a fixed delay to each read/write operation.
// Accepts duration strings like "10ms", "1s", "500us".
Latency caddy.Duration `json:"latency,omitempty"`
// Jitter adds random delay (0 to jitter value) to each read/write operation.
// Accepts duration strings like "5ms", "100ms", "1s".
Jitter caddy.Duration `json:"jitter,omitempty"`
// contains filtered or unexported fields
}
The `throttle` listener limits the bandwidth of the connection to the given values and can inject chaos engineering features like latency and jitter.
func (Listener) CaddyModule ¶
func (Listener) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Listener) UnmarshalCaddyfile ¶
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
Click to show internal directories.
Click to hide internal directories.