Documentation
¶
Index ¶
- Constants
- Variables
- func Locker(locker sync.RWMutex, fn func())
- func NewListenerForTcpCopyingProxy(addr string)
- func SetBlacklistForHost(host string, add bool) (string, error)
- func SetLatencyForHost(host, _type string, latency time.Duration, count int) (string, error)
- func SetWhitelistForHost(host string, add bool) (string, error)
- type Counter
- type LatencyAndCountStruct
Constants ¶
View Source
const ( PER_REMOTE_READ = "per_remote_read" PER_REMOTE_WRITE = "per_remote_write" PER_REMOTE_CONNECT = "per_remote_connect" ACTIVE_CONNS = "conns;Active:All" TOTAL_CONNS = "conns;Total;All" TOTAL_BYTES_IN = "bytes;Total;In" TOTAL_BYTES_OUT = "bytes;Total;Out" )
core
Variables ¶
View Source
var ( HostToSleepPerRemoteWrite = make(map[string]LatencyAndCountStruct) HostToSleepPerRemoteWriteSync sync.RWMutex HostToSleepPerRemoteRead = make(map[string]LatencyAndCountStruct) HostToSleepPerRemoteReadSync sync.RWMutex HostToSleepPerRemoteConnect = make(map[string]LatencyAndCountStruct) HostToSleepPerRemoteConnectSync sync.RWMutex Blacklist = false HostToClose = make(map[string]interface{}) Whitelist = false HostToAllow = make(map[string]interface{}) )
Destructive behaviors
Functions ¶
func NewListenerForTcpCopyingProxy ¶
func NewListenerForTcpCopyingProxy(addr string)
func SetLatencyForHost ¶
Types ¶
type LatencyAndCountStruct ¶
func GetLatencyForHost ¶
func GetLatencyForHost(host, _type string) (string, LatencyAndCountStruct, bool, error)
Click to show internal directories.
Click to hide internal directories.