zookeeper

package
v1.28.0-alpha.65 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package zookeeper xxx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(hosts string) storage.Storage

NewStorage create etcd storage

Types

type ConLocker

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

ConLocker wrapper lock for release connection

func (*ConLocker) Lock

func (cl *ConLocker) Lock() error

Lock try to Lock

func (*ConLocker) Unlock

func (cl *ConLocker) Unlock() error

Unlock release lock and connection

type ZkClient

type ZkClient interface {
	Get(path string) ([]byte, *zkclient.Stat, error)
	GetW(path string) ([]byte, *zkclient.Stat, <-chan zkclient.Event, error)
	Children(path string) ([]string, *zkclient.Stat, error)
	ChildrenW(path string) ([]string, *zkclient.Stat, <-chan zkclient.Event, error)
	Exists(path string) (bool, error)
	ExistsW(path string) (bool, *zkclient.Stat, <-chan zkclient.Event, error)
	Set(path string, data []byte, version int32) error
	Create(path string, data []byte) (string, error)
	CreateEphAndSeq(path string, data []byte) (string, error)
	CreateEphAndSeqEx(path string, data []byte) (string, error)
	Delete(path string, version int32) error
	Close()
}

ZkClient interface to define zk operation interface is only use for dependency injection

Jump to

Keyboard shortcuts

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