import "gopkg.in/src-d/go-vitess.v1/vt/zkctl"
zkconf.go zkctl.go zkctl_local.go
const GUESS_MYID = 0
Search for first existing file in cnfFiles and subsitute in the right values.
Create a config for this instance.
<server_id>@<hostname>:<leader_port>:<election_port>:<client_port>
If server_id > 1000, then we assume this is a global quorum. server_id's must be 1-255, global id's are 1001-1255 mod 1000.
ServerId is a unique id for a server - must be 1-255
type Zkd struct {
// contains filtered or unexported fields
}
Zkd manages the running of ZooKeeper servers.
NewZkd creates a Zkd.
StartLocalZk is a helper method to create a local ZK process. Used in tests, mostly. It will log.Fatal out if there is an error. Each call should use different serverID / ports, so tests don't interfere with eachother. Use the testfiles package to achieve this.
Done returns a channel that is closed when the underlying process started by this Zkd has terminated. If the process was started by someone else, this channel will never be closed.
Init generates a new config and then starts ZooKeeper.
Inited returns true if the server config has been initialized.
Shutdown kills a ZooKeeper server, but keeps its data dir intact.
Start runs an already initialized ZooKeeper server.
Teardown shuts down the server and removes its data dir.
Package zkctl imports 16 packages (graph). Updated 2019-06-13. Refresh now. Tools for package owners.