haproxy

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HAProxyAllHostsTransitioning error = fmt.Errorf("Haproxy: all hosts are in transition. HAProxy is likely reloading")
View Source
var HAProxyAllUpHostsTransitioning error = fmt.Errorf("Haproxy: all host marked as UP are in transition. HAProxy is likely reloading")
View Source
var HAProxyEmptyBody error = fmt.Errorf("Haproxy GET error: empty body")
View Source
var HAProxyEmptyStatus error = fmt.Errorf("Haproxy CSV parsing error: no lines found")
View Source
var HAProxyMissingPool error = fmt.Errorf("Haproxy CSV parsing: pool not found")
View Source
var HAProxyPartialStatus error = fmt.Errorf("Haproxy CSV parsing error: only got partial file")
View Source
var MaxHTTPGetConcurrency = 2

Functions

func ParseCsvHosts

func ParseCsvHosts(csv string, poolName string) (hosts []string, err error)

ParseCsvHosts reads HAProxy CSV text and returns lists of hosts participating in the given pool (backend). See comment for ParseHosts

func ParseHosts

func ParseHosts(csvLines []string, poolName string) (hosts []string, err error)

ParseHosts reads HAProxy CSV lines and returns lists of hosts participating in the given pool (backend) Returned are all non-disabled hosts in given backend. Thus, a NOLB is skipped; any UP or DOWN hosts are returned. Such list indicates the hosts which can be expected to be active, which is then the list freno will probe.

func Read

func Read(host string, port int) (csv string, err error)

Read will read HAProxy URI and return with the CSV text

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL