zookeeper

package
v0.0.0-...-d7e1125 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ConnectionParams
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(nodes api.ZookeeperNodes, _params ...*ConnectionParams) *Connection

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Create

func (c *Connection) Create(ctx context.Context, path string, value []byte, flags int32, acl []zk.ACL) (pathCreated string, err error)

func (*Connection) Delete

func (c *Connection) Delete(ctx context.Context, path string, version int32) error

func (*Connection) Details

func (c *Connection) Details(ctx context.Context, path string) (exists bool, stat *zk.Stat, err error)

func (*Connection) Exists

func (c *Connection) Exists(ctx context.Context, path string) bool

func (*Connection) Get

func (c *Connection) Get(ctx context.Context, path string) (data []byte, stat *zk.Stat, err error)

func (*Connection) Set

func (c *Connection) Set(ctx context.Context, path string, value []byte, version int32) (stat *zk.Stat, err error)

type ConnectionParams

type ConnectionParams struct {
	MaxRetriesNum         int
	MaxConcurrentRequests int64
	TimeoutConnect        time.Duration
	TimeoutKeepAlive      time.Duration

	CertFile string
	KeyFile  string
	CaFile   string
	AuthFile string
}

func (*ConnectionParams) Normalize

func (p *ConnectionParams) Normalize() *ConnectionParams

type PathManager

type PathManager struct {
	*Connection
}

func NewPathManager

func NewPathManager(connection *Connection) *PathManager

func (*PathManager) Ensure

func (p *PathManager) Ensure(path string)

Jump to

Keyboard shortcuts

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