timeplus-io / proton-go-driver

Go driver for Timeplus Proton
https://timeplus.com
Apache License 2.0
4 stars 3 forks source link

Support Cluster IP #69

Open gangtao opened 3 months ago

gangtao commented 3 months ago

For proton cluster, need to support cluster ip addresses

  1. make sure cluster ip works

    conn := proton.OpenDB(&proton.Options{
        Addr: []string{"ip1:8463","ip2:8463,"ip3:8463"},
        Auth: proton.Auth{
            Username: "default",
            Password: "",
        },
    })
    var value int
    conn.QueryRow("SELECT 300").Scan(&value)
    fmt.Println(value)
  2. client level load balancer

implement a round robin based query load balancing