Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotAcquireLock = errors.New("failed t acquire lock")
)
Functions ¶
This section is empty.
Types ¶
type DefaultLock ¶
type DefaultLock struct {
// contains filtered or unexported fields
}
func (*DefaultLock) Unlock ¶
func (d *DefaultLock) Unlock(key string) error
Unlock implements Locker.
type EtcdConfig ¶
type Locker ¶
func NewEtcdMutex ¶
func NewEtcdMutex(ctx context.Context, cfg EtcdConfig) (Locker, error)
func NewRedisMutex ¶
func NewRedisMutex(ctx context.Context, cfg *RedisConfig) (Locker, error)
func NewRedisMutexWithClient ¶
type RedisMutex ¶
type RedisMutex struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.