client

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocker

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

func (*Blocker) Block

func (b *Blocker) Block()

func (*Blocker) Unblock

func (b *Blocker) Unblock()

type Client

type Client interface {
	Register(root, nodeName string, data []byte) error
	Unregister(root, nodeName string)
	Watch(root, nodeName string, processor WatchProcessor)
	Unwatch(root, nodeName string)
	Get(path string) ([]byte, error)
	GetChildren(path string) ([]string, error)
	Close()
}

func NewClient

func NewClient(zkAddr []string, timeout int) (Client, error)

Create new zk client

type WatchProcessor

type WatchProcessor interface {
	ProcChildrenChange(nodeName string, subNodeNames []string)
}

Interface for node watching processor

Jump to

Keyboard shortcuts

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