Help us shape the future of Go! Take the 2026 Go Developer Survey

treecache

package
v0.311.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 419

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZookeeperLogger

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

ZookeeperLogger wraps a *slog.Logger into a zk.Logger.

func NewZookeeperLogger

func NewZookeeperLogger(logger *slog.Logger) ZookeeperLogger

NewZookeeperLogger is a constructor for ZookeeperLogger.

func (ZookeeperLogger) Printf

func (zl ZookeeperLogger) Printf(s string, i ...any)

Printf implements zk.Logger.

type ZookeeperTreeCache

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

A ZookeeperTreeCache keeps data from all children of a Zookeeper path locally cached and updated according to received events.

func NewZookeeperTreeCache

func NewZookeeperTreeCache(conn *zk.Conn, path string, events chan ZookeeperTreeCacheEvent, logger *slog.Logger) *ZookeeperTreeCache

NewZookeeperTreeCache creates a new ZookeeperTreeCache for a given path.

func (*ZookeeperTreeCache) Stop

func (tc *ZookeeperTreeCache) Stop()

Stop stops the tree cache.

type ZookeeperTreeCacheEvent

type ZookeeperTreeCacheEvent struct {
	Path string
	Data *[]byte
}

A ZookeeperTreeCacheEvent models a Zookeeper event for a path.

Jump to

Keyboard shortcuts

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