zookeeper

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheListener

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

CacheListener defines keyListeners and rootPath

func NewCacheListener

func NewCacheListener(rootPath string, listener *zookeeper.ZkEventListener) *CacheListener

NewCacheListener creates a new CacheListener

func (*CacheListener) AddListener

func (l *CacheListener) AddListener(key string, listener mapping.MappingListener)

AddListener will add a listener if loaded

func (*CacheListener) DataChange

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

DataChange changes all listeners' event

func (*CacheListener) RemoveListener

func (l *CacheListener) RemoveListener(key string, listener mapping.MappingListener)

RemoveListener will delete a listener if loaded

type ListenerSet added in v3.3.0

type ListenerSet struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ListenerSet defines a thread-safe set of listeners

func NewListenerSet added in v3.3.0

func NewListenerSet() *ListenerSet

func (*ListenerSet) Add added in v3.3.0

func (s *ListenerSet) Add(listener mapping.MappingListener)

Add adds a listener to the set

func (*ListenerSet) ForEach added in v3.3.0

func (s *ListenerSet) ForEach(f func(mapping.MappingListener) error) error

ForEach iterates over all listeners in the set

func (*ListenerSet) Has added in v3.3.0

func (s *ListenerSet) Has(listener mapping.MappingListener) bool

Has checks if a listener exists in the set

func (*ListenerSet) Remove added in v3.3.0

func (s *ListenerSet) Remove(listener mapping.MappingListener)

Remove removes a listener from the set

Jump to

Keyboard shortcuts

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