Documentation
¶
Index ¶
- Variables
- type HeldLock
- type Inspector
- type Lease
- type LocalManager
- func (m *LocalManager) Acquire(ctx context.Context, key string) (Lease, error)
- func (m *LocalManager) Close() error
- func (m *LocalManager) ForceRelease(_ context.Context, key string) (bool, error)
- func (m *LocalManager) SetWaitTimeout(d time.Duration)
- func (m *LocalManager) Snapshot(_ context.Context) ([]HeldLock, error)
- func (c *LocalManager) Stats() LockStats
- type LockStats
- type Manager
- type NATSManager
- func (m *NATSManager) Acquire(ctx context.Context, key string) (Lease, error)
- func (m *NATSManager) Close() error
- func (m *NATSManager) FenceToken(key string) (uint64, bool)
- func (m *NATSManager) ForceRelease(ctx context.Context, key string) (bool, error)
- func (m *NATSManager) SetWaitTimeout(d time.Duration)
- func (m *NATSManager) Snapshot(ctx context.Context) ([]HeldLock, error)
- func (c *NATSManager) Stats() LockStats
- type RedisManager
- func (m *RedisManager) Acquire(ctx context.Context, key string) (Lease, error)
- func (m *RedisManager) Close() error
- func (m *RedisManager) ForceRelease(ctx context.Context, key string) (bool, error)
- func (m *RedisManager) SetWaitTimeout(d time.Duration)
- func (m *RedisManager) Snapshot(ctx context.Context) ([]HeldLock, error)
- func (c *RedisManager) Stats() LockStats
- type RedisOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLockHeld = errors.New("lock is held by another owner")
Functions ¶
This section is empty.
Types ¶
type LocalManager ¶
type LocalManager struct {
// contains filtered or unexported fields
}
func NewLocalManager ¶
func NewLocalManager() *LocalManager
func (*LocalManager) Close ¶
func (m *LocalManager) Close() error
func (*LocalManager) ForceRelease ¶
func (*LocalManager) SetWaitTimeout ¶
func (m *LocalManager) SetWaitTimeout(d time.Duration)
type NATSManager ¶
type NATSManager struct {
// contains filtered or unexported fields
}
func NewNATSManager ¶
func (*NATSManager) Close ¶
func (m *NATSManager) Close() error
func (*NATSManager) FenceToken ¶
func (m *NATSManager) FenceToken(key string) (uint64, bool)
func (*NATSManager) ForceRelease ¶
func (*NATSManager) SetWaitTimeout ¶
func (m *NATSManager) SetWaitTimeout(d time.Duration)
type RedisManager ¶
type RedisManager struct {
// contains filtered or unexported fields
}
func NewRedisManagerWithOptions ¶
func NewRedisManagerWithOptions(opts RedisOptions, logger *zap.Logger) (*RedisManager, error)
func (*RedisManager) Close ¶
func (m *RedisManager) Close() error
func (*RedisManager) ForceRelease ¶
func (*RedisManager) SetWaitTimeout ¶
func (m *RedisManager) SetWaitTimeout(d time.Duration)
Click to show internal directories.
Click to hide internal directories.