zklock

package
v0.0.0-...-d843dc6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config ZkLockConfig) (syncx.Locker, error)

Types

type ZkLock

type ZkLock struct {
	ZkLockConfig
	// contains filtered or unexported fields
}

func (*ZkLock) Close

func (l *ZkLock) Close() error

func (*ZkLock) Lock

func (l *ZkLock) Lock(ctx context.Context) error

func (*ZkLock) TryLock

func (l *ZkLock) TryLock(ctx context.Context) (bool, error)

func (*ZkLock) UnLock

func (l *ZkLock) UnLock(ctx context.Context) error

type ZkLockConfig

type ZkLockConfig struct {
	Conn *zk.Conn
	Path string
	ACL  []zk.ACL
}

Jump to

Keyboard shortcuts

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