zookeeper

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 27

Documentation

Overview

Package zookeeper implements registry around zookeeper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

nolint

type Options

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

nolint

type RegistryConfigurationListener

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

RegistryConfigurationListener represent the processor of zookeeper watcher

func NewRegistryConfigurationListener

func NewRegistryConfigurationListener(client *gxzookeeper.ZookeeperClient, reg *zkRegistry, conf *common.URL) *RegistryConfigurationListener

NewRegistryConfigurationListener for listening the event of zk.

func (*RegistryConfigurationListener) Close

func (l *RegistryConfigurationListener) Close()

Close RegistryConfigurationListener only once

func (*RegistryConfigurationListener) Next

Next will observe the registry state and events chan

func (*RegistryConfigurationListener) Process

Process submit the ConfigChangeEvent to the event chan to notify all observer

type RegistryDataListener

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

RegistryDataListener contains all URL information subscribed by zookeeper registry

func NewRegistryDataListener

func NewRegistryDataListener() *RegistryDataListener

NewRegistryDataListener constructs a new RegistryDataListener

func (*RegistryDataListener) Close

func (l *RegistryDataListener) Close()

Close all RegistryConfigurationListener in subscribed

func (*RegistryDataListener) DataChange

func (l *RegistryDataListener) DataChange(event remoting.Event) bool

DataChange accepts all events sent from the zookeeper server and trigger the corresponding listener for processing

func (*RegistryDataListener) SubscribeURL

func (l *RegistryDataListener) SubscribeURL(url *common.URL, listener config_center.ConfigurationListener)

SubscribeURL is used to set a watch listener for url

func (*RegistryDataListener) UnSubscribeURL

UnSubscribeURL is used to unset a watch listener for url

Jump to

Keyboard shortcuts

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