zookeeper

package
v0.0.0-...-1bf19d3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State int32
const (
	StateUnknown           State = -1
	StateDisconnected      State = 0
	StateConnecting        State = 1
	StateAuthFailed        State = 4
	StateConnectedReadOnly State = 5
	StateSaslAuthenticated State = 6
	StateExpired           State = -112
	StateConnected               = State(100)
	StateHasSession              = State(101)
)

type ZkConn

type ZkConn struct {
	// contains filtered or unexported fields
}

func New

func New(zkServers []string) (*ZkConn, error)

Function to create the zookeeper object then connect to the given zookeeper server we need this to be able to send any command to kafka

func (*ZkConn) CheckKafkaBroker

func (zkPtr *ZkConn) CheckKafkaBroker(brokerList []string) (int, error)

Function to check current kafka brokers this is not a zookeeper thing but for now in this class

func (*ZkConn) Close

func (zkPtr *ZkConn) Close()

Function to close a zookeeper connection

func (*ZkConn) IsFollower

func (zkPtr *ZkConn) IsFollower() bool

Function to see if a zookeeper is a leader

func (*ZkConn) IsLeader

func (zkPtr *ZkConn) IsLeader() bool

Function to see if a zookeeper is a leader

func (*ZkConn) Status

func (zkPtr *ZkConn) Status(wantStat string) (string, bool)

Function to see if a zookeeper is get traffic

Jump to

Keyboard shortcuts

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