Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HAProxySocket ¶
type HAProxySocket interface { Address() string HasConn() bool Send(observer func(duration time.Duration), command ...string) ([]string, error) Unlistening() error Close() error }
HAProxySocket ...
func NewSocketConcurrent ¶
func NewSocketConcurrent(address string, keepalive bool) HAProxySocket
NewSocketConcurrent ...
type ProcTable ¶
ProcTable ...
func HAProxyProcs ¶
func HAProxyProcs(masterSocket HAProxySocket) (*ProcTable, error)
HAProxyProcs reads and converts `show proc` from the master CLI to a ProcTable instance. Waits for the reload to complete while master CLI is down and the attempt to connect leads to a connection refused. Some context: https://www.mail-archive.com/haproxy@formilux.org/msg38415.html The amount of time between attempts increases exponentially between 1ms and 64ms, and aritmetically betweem 128ms and 1s in order to save CPU on long reload events and quit fast on the fastest ones. The whole processing time can be calculated by the caller as the haproxy reload time.
Click to show internal directories.
Click to hide internal directories.