Documentation ¶
Index ¶
- type Option
- type Options
- type RegistryConfigurationListener
- type RegistryDataListener
- func (l *RegistryDataListener) Close()
- func (l *RegistryDataListener) DataChange(eventType remoting.Event) bool
- func (l *RegistryDataListener) SubscribeURL(url *common.URL, listener config_center.ConfigurationListener)
- func (l *RegistryDataListener) UnSubscribeURL(url *common.URL) config_center.ConfigurationListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
func (l *RegistryConfigurationListener) Next() (*registry.ServiceEvent, error)
Next will observe the registry state and events chan
func (*RegistryConfigurationListener) Process ¶
func (l *RegistryConfigurationListener) Process(configType *config_center.ConfigChangeEvent)
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 ¶ added in v1.5.0
func (l *RegistryDataListener) Close()
Close all RegistryConfigurationListener in subscribed
func (*RegistryDataListener) DataChange ¶
func (l *RegistryDataListener) DataChange(eventType remoting.Event) bool
DataChange accepts all events sent from the zookeeper server and trigger the corresponding listener for processing
func (*RegistryDataListener) SubscribeURL ¶ added in v1.5.0
func (l *RegistryDataListener) SubscribeURL(url *common.URL, listener config_center.ConfigurationListener)
SubscribeURL is used to set a watch listener for url
func (*RegistryDataListener) UnSubscribeURL ¶ added in v1.5.0
func (l *RegistryDataListener) UnSubscribeURL(url *common.URL) config_center.ConfigurationListener
UnSubscribeURL is used to unset a watch listener for url