Skip to content

go-haproxy client is returning empty values #9

@glaceroy

Description

@glaceroy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions