go-haproxy icon indicating copy to clipboard operation
go-haproxy copied to clipboard

go-haproxy client is returning empty values

Open glaceroy opened this issue 5 years ago • 0 comments

I am running go-haproxy client on Minishift. I would like to extract the router backend information like if the route is marked UP or DOWN in router.

My router is running under the default project as router-5-chmh5 1/1 Running 2 1d 192.168.64.5 localhost

Running the below code and it comes back with empty values Import "github.com/bcicen/go-haproxy" hapclient := &haproxy.HAProxyClient{ Addr: "tcp://192.168.64.5:1936", } hapinfo, err := hapclient.Info() if err != nil { fmt.Println(err) return } fmt.Printf(" - %s Version is : %s\n", hapinfo.Name, hapinfo.Version)

This doesn't work when I use Addr: "unix:///var/lib/haproxyrun/haproxy.sock". I get error - dial unix /var/lib/haproxy/run/haproxy.sock: connect: no such file or directory

Please assist with this

glaceroy avatar Jun 24 '20 15:06 glaceroy