Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleClientRestart ¶
func HandleClientRestart(r ZkClientFacade)
HandleClientRestart keeps the connection between client and server This method should be used only once. You can use handleClientRestart() in package registry.
func NewZkClient ¶
func NewZkClient(zkName string, config *model.RemoteConfig) (*gxzookeeper.ZookeeperClient, error)
func ValidateZookeeperClient ¶
func ValidateZookeeperClient(container ZkClientFacade, zkName string) error
Types ¶
type Listener ¶
type Listener interface { // Close closes this listener Close() // WatchAndHandle watch the target path and handle the event WatchAndHandle() }
type ZkClientFacade ¶
type ZkClientFacade interface { Name() string ZkClient() *gxzookeeper.ZookeeperClient SetZkClient(*gxzookeeper.ZookeeperClient) ZkClientLock() *sync.Mutex WaitGroup() *sync.WaitGroup // for wait group control, zk client listener & zk client container Done() chan struct{} // for registry destroy RestartCallBack() bool GetConfig() *model.RemoteConfig }
Click to show internal directories.
Click to hide internal directories.