roachbalancer

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 4 Imported by: 0

README

GoDoc

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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