Documentation ¶
Index ¶
- Constants
- func MakeZooCfg(cnfFiles []string, cnf *ZkConfig, header string) (string, error)
- type ZkConfig
- type Zkd
- func (zkd *Zkd) CheckProcess() error
- func (zkd *Zkd) ConfigChanged() (bool, error)
- func (zkd *Zkd) Init() error
- func (zkd *Zkd) Inited() bool
- func (zkd *Zkd) LocalClientAddr() string
- func (zkd *Zkd) Reinit(preserveData bool) (err error)
- func (zkd *Zkd) Shutdown() error
- func (zkd *Zkd) Start() error
- func (zkd *Zkd) Teardown() error
Constants ¶
View Source
const ( StartWaitTime = 20 // number of seconds to wait at Start ShutdownWaitTime = 20 // number of seconds to wait at Shutdown )
View Source
const GUESS_MYID = 0
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ZkConfig ¶
func MakeZkConfigFromString ¶
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.
func NewZkConfig ¶
func NewZkConfig() *ZkConfig
ServerId is a unique id for a server - must be 1-255
func (*ZkConfig) ConfigFile ¶
func (*ZkConfig) DirectoryList ¶
type Zkd ¶
type Zkd struct {
// contains filtered or unexported fields
}
func (*Zkd) CheckProcess ¶
func (*Zkd) ConfigChanged ¶
func (*Zkd) LocalClientAddr ¶
Click to show internal directories.
Click to hide internal directories.