Documentation ¶
Index ¶
- Variables
- func DoubleLockUtil(ctx context.Context, key string, locker Locker, ...) error
- func SingleLockUtil(ctx context.Context, key string, locker Locker, ...) error
- type Locker
- type Lockers
- func (l *Lockers) Lock(ctx context.Context, fun, lockKey string, lockTime time.Duration) (int32, error)
- func (l *Lockers) LockCyclic(ctx context.Context, fun, lockKey string, lockTime time.Duration) (int32, error)
- func (l *Lockers) UnLock(ctx context.Context, lockKey string, value int32, fun string)
- type RedisLocker
Constants ¶
This section is empty.
Variables ¶
View Source
var NotNeedLockError = errors.New("need not lock")
Functions ¶
Types ¶
type Lockers ¶
type RedisLocker ¶
func (*RedisLocker) Lock ¶
func (r *RedisLocker) Lock(key string) error
func (*RedisLocker) Unlock ¶
func (r *RedisLocker) Unlock(key string) error
Click to show internal directories.
Click to hide internal directories.