Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerConfig ¶
type ServerConfig struct { TickTime int // Number of milliseconds of each tick InitLimit int // Number of ticks that the initial synchronization phase can take SyncLimit int // Number of ticks that can pass between sending a request and getting an acknowledgement DataDir string // Directory where the snapshot is stored ClientPort int // Port at which clients will connect AutoPurgeSnapRetainCount int // Number of snapshots to retain in dataDir AutoPurgePurgeInterval int // Purge task internal in hours (0 to disable auto purge) FLWCommandsWhitelist string Servers []*ServerConfigServer ReconfigEnabled bool }
ServerConfig allows programmatic configurability of a Zookeeper server.
func DefaultConfig ¶
func DefaultConfig() *ServerConfig
DefaultConfig returns a ServerConfig with default values.
type ServerConfigServer ¶
ServerConfigServer represents a single server in ServerConfig when replicated mode is used.
type ZKServer ¶
type ZKServer struct { Version string Config *ServerConfig // contains filtered or unexported fields }
ZKServer represents a configurable Zookeeper server, mainly used for integration testing.
func NewZKServer ¶
func NewZKServer(version string, config *ServerConfig) (*ZKServer, error)
NewZKServer creates a new ZKServer instance using the given version and config map. Contents of the config struct are written to a file which will later be used by the ZK binary.
Click to show internal directories.
Click to hide internal directories.