modulepackage
0.1.2
Repository: https://github.com/heavyhorst/roachbalancer.git
Documentation: pkg.go.dev
# README
roachbalancer
roachbalancer is a small experimental cockroachdb load balancer with automatic live-node discovery. The loadbalancer can be embedded or run as a stand-alone application.
Usage
Embedded
func main() {
b := balancer.New("root", "/certs", false, "xxx.xxx.xxx.xxx:26257", "xxx.xxx.xxx.xxx:26257")
go b.Listen(0) // 0 means random high port
b.WaitReady()
// now use b.GetAddr() as the cockroachdb address
}
Use the binary
./roachbalancer -certs-dir /certs -node xxx.xxx.xxx.xxx:26257
# Packages
No description provided by the author