Documentation
¶
Index ¶
Constants ¶
View Source
const ClusterChanged = 3
ClusterChanged - signals for cluster change
View Source
const Disconnected = 4
Disconnected - int signal for disconnection
View Source
const ( // EventDisconnected - specifies a custom event for disconnection EventDisconnected zk.EventType = 99 )
View Source
const Master = 1
Master - signals for master role acquisition
View Source
const Slave = 2
Slave - signals for slave role acquisition
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ZKURL []string ZKElectionNodeURI string ZKSlaveNodesURI string ReconnectionTimeout string SessionTimeout string ClusterChangeCheckTime string ClusterChangeWaitTime string }
Config - configures the election
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager - handles the zookeeper election
func (*Manager) Disconnect ¶ added in v1.18.0
func (m *Manager) Disconnect()
Disconnect - disconnects from the zookeeper
func (*Manager) GetClusterInfo ¶
GetClusterInfo - return cluster info
func (*Manager) GetHostname ¶
GetHostname - retrieves this node hostname from the OS
Click to show internal directories.
Click to hide internal directories.