Versions in this module Expand all Collapse all v4 v4.2.1 Feb 9, 2023 v4.2.0 Aug 12, 2022 v4.1.0 Aug 3, 2022 v4.0.0 May 17, 2022 Changes in this version + var ErrAlreadyOwnLock = errors.New("requestor already has an active lock") + var ErrInvalidSeqNode = errors.New("znode doesn't appear to be a sequential type") + var ErrLockingTimedOut = errors.New("attempt to acquire lock timed out") + var ErrNotLockOwner = errors.New("non-owner attempted to call unlock") + var ErrOwnerAlreadySet = errors.New("attempt to set owner on a claimed lock") + type ErrExpireLockFailed struct + func (err ErrExpireLockFailed) Error() string + type ErrLockingFailed struct + func (err ErrLockingFailed) Error() string + type ErrUnlockingFailed struct + func (err ErrUnlockingFailed) Error() string + type LockEntries struct + func (le LockEntries) First() (int, error) + func (le LockEntries) IDs() []int + func (le LockEntries) LockAhead(id int) (int, error) + func (le LockEntries) LockPath(id int) (string, error) + type ZooKeeperClient interface + Children func(string) ([]string, *zk.Stat, error) + Create func(string, []byte, int32, []zk.ACL) (string, error) + CreateProtectedEphemeralSequential func(string, []byte, []zk.ACL) (string, error) + Delete func(string, int32) error + Get func(string) ([]byte, *zk.Stat, error) + GetW func(string) ([]byte, *zk.Stat, <-chan zk.Event, error) + type ZooKeeperLock struct + OwnerKey string + Path string + TTL int + func NewZooKeeperLock(c ZooKeeperLockConfig) (*ZooKeeperLock, error) + func NewZooKeeperLockWithClient(cfg ZooKeeperLockConfig, zkc ZooKeeperClient) (*ZooKeeperLock, error) + func (z *ZooKeeperLock) Lock(ctx context.Context) error + func (z *ZooKeeperLock) Owner() interface{} + func (z *ZooKeeperLock) Unlock(ctx context.Context) error + func (z *ZooKeeperLock) UnlockLogError(ctx context.Context) + type ZooKeeperLockConfig struct + Address string + OwnerKey string + Path string + TTL int Other modules containing this package github.com/DataDog/kafka-kit/v3