Documentation ¶
Overview ¶
Package lib allows for using speedbump as a library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LatencyCfg ¶
type LatencyGenerator ¶
type LatencyGenerator interface {
// contains filtered or unexported methods
}
type Speedbump ¶
type Speedbump struct {
// contains filtered or unexported fields
}
Speedbump is a proxy instance returned by NewSpeedbump
func NewSpeedbump ¶
func NewSpeedbump(cfg *SpeedbumpCfg) (*Speedbump, error)
NewSpeedbump creates a Speedbump instance based on a provided config
type SpeedbumpCfg ¶
type SpeedbumpCfg struct { // IP or a hostname to listen on (binds to all network interfaces if unspecified) Host string // Port specifies the local port number to listen on Port int // DestAddr specifies the proxy desination address in host:port format DestAddr string // BufferSize specifies the number of bytes in a buffer used for TCP reads BufferSize int // The size of the delay queue containing read buffers (defaults to 1024) QueueSize int // LatencyCfg specifies parameters of the desired latency summands Latency *LatencyCfg // LogLevel can be one of: DEBUG, TRACE, INFO, WARN, ERROR LogLevel string }
SpeedbumpCfg contains Spedbump instance configuration
Click to show internal directories.
Click to hide internal directories.