Documentation ¶
Index ¶
- type ZookeeperLock
- func (p *ZookeeperLock) Features() []lock.Feature
- func (p *ZookeeperLock) Init(metadata lock.Metadata) error
- func (p *ZookeeperLock) LockKeepAlive(ctx context.Context, request *lock.LockKeepAliveRequest) (*lock.LockKeepAliveResponse, error)
- func (p *ZookeeperLock) OnLogLevelChanged(level logger.LogLevel)
- func (p *ZookeeperLock) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
- func (p *ZookeeperLock) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZookeeperLock ¶
type ZookeeperLock struct {
// contains filtered or unexported fields
}
ZookeeperLock lock store
func NewZookeeperLock ¶
func NewZookeeperLock() *ZookeeperLock
NewZookeeperLock Create ZookeeperLock
func (*ZookeeperLock) Features ¶
func (p *ZookeeperLock) Features() []lock.Feature
Features is to get ZookeeperLock's features
func (*ZookeeperLock) Init ¶
func (p *ZookeeperLock) Init(metadata lock.Metadata) error
Init ZookeeperLock
func (*ZookeeperLock) LockKeepAlive ¶
func (p *ZookeeperLock) LockKeepAlive(ctx context.Context, request *lock.LockKeepAliveRequest) (*lock.LockKeepAliveResponse, error)
LockKeepAlive try to renewal lease
func (*ZookeeperLock) OnLogLevelChanged ¶
func (p *ZookeeperLock) OnLogLevelChanged(level logger.LogLevel)
OnLogLevelChanged change log level
func (*ZookeeperLock) TryLock ¶
func (p *ZookeeperLock) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
TryLock Node tries to acquire a zookeeper lock
func (*ZookeeperLock) Unlock ¶
func (p *ZookeeperLock) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
Unlock Node tries to release a zookeeper lock
Click to show internal directories.
Click to hide internal directories.