zookeeper

package
v0.0.0-...-532f4bb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZkClient

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

func InitZookeeper

func InitZookeeper(c *ZkConfig) (*ZkClient, error)

func (*ZkClient) Children

func (cli *ZkClient) Children(path string) ([]string, error)

func (*ZkClient) Close

func (cli *ZkClient) Close()

func (*ZkClient) Create

func (cli *ZkClient) Create(path string, flags int32, data []byte) error

func (*ZkClient) Delete

func (cli *ZkClient) Delete(path string) error

func (*ZkClient) Exists

func (cli *ZkClient) Exists(path string) (bool, error)

func (*ZkClient) Get

func (cli *ZkClient) Get(path string) ([]byte, error)

func (*ZkClient) Lock

func (cli *ZkClient) Lock(path string) (*zk.Lock, error)

分布式事务锁

func (*ZkClient) Modify

func (cli *ZkClient) Modify(path string, data []byte) error

func (*ZkClient) Unlock

func (cli *ZkClient) Unlock(lock *zk.Lock) error

type ZkConfig

type ZkConfig struct {
	Urls    []string
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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