haproxy

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 8 Imported by: 0

README

go-haproxy

client library for haproxy statictics. Currently, only partial information is supported.

For more detail of statistics, see https://cbonte.github.io/haproxy-dconv/1.8/management.html#9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOption

type ConfigOption func(*haproxyClient)

func HTTPClient

func HTTPClient(client *http.Client) ConfigOption

func Host

func Host(host string) ConfigOption

func Path

func Path(path string) ConfigOption

func Port

func Port(port string) ConfigOption

type Stats

type Stats struct {
	Pxname string `json:"pxname"`
	Svname string `json:"svname"`
	Stot   int    `json:"stot"`   // [LFBS]: cumulative number of sessions
	Type   string `json:"type"`   // [LFBS]: type of proxy
	Rate   int    `json:"rate"`   // [.FBS]: number of sessions per second over last elapsed second
	Bck    int    `json:"bck"`    // [..BS]: number of backup servers (backend), server is backup (server)
	Status string `json:"status"` // [LFBS]: status (UP/DOWN/NOLB/MAINT/MAINT(via)/MAINT(resolution)...)
	Scur   int    `json:"scur"`   // [LFBS]: current sessions
}

func Status

func Status(opts ...ConfigOption) ([]*Stats, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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