zoke

package
v0.0.0-...-b9abb6c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNodeCreated
	EventNodeDeleted
	EventNodeDataChanged
	EventNodeChildrenChanged
)

Variables

View Source
var (
	Reactor = new(Impl)
)

Functions

This section is empty.

Types

type CallBack

type CallBack interface {
	OnDataChange(path string, client *ZkClient)
	OnChildNodeChange(path string, client *ZkClient)
}

type Impl

type Impl struct {
	CallBack
}

func (Impl) OnChildNodeChange

func (i Impl) OnChildNodeChange(path string, client *ZkClient)

func (Impl) OnDataChange

func (i Impl) OnDataChange(path string, client *ZkClient)

type ZkClient

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

func GetInstanceClient

func GetInstanceClient(hosts []string) (*ZkClient, error)

func (*ZkClient) AddChildrenWatch

func (z *ZkClient) AddChildrenWatch(path string, call CallBack)

func (*ZkClient) AddDataWatch

func (z *ZkClient) AddDataWatch(path string, call CallBack)

func (*ZkClient) Close

func (z *ZkClient) Close()

func (*ZkClient) CreateNode

func (z *ZkClient) CreateNode(path string, data string) error

func (*ZkClient) GetChildNodes

func (z *ZkClient) GetChildNodes(path string) ([]string, error)

func (*ZkClient) GetNodeData

func (z *ZkClient) GetNodeData(path string) (string, error)

func (*ZkClient) InitServiceConfig

func (z *ZkClient) InitServiceConfig(path string, config map[string]string)

*

  • Init the config on the remote zookeeper.

func (*ZkClient) SetNodeData

func (z *ZkClient) SetNodeData(path string, data string) error

Jump to

Keyboard shortcuts

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