Documentation ¶
Index ¶
- Variables
- type ILocker
- type Locker
- func (lock *Locker) Lock(ctx context.Context, resource string) (*redsync.Mutex, error)
- func (lock *Locker) TryLock(ctx context.Context, resource string, maxExpire, retryDelay time.Duration, ...) (*redsync.Mutex, error)
- func (lock *Locker) Unlock(ctx context.Context, mutex *redsync.Mutex) (bool, error)
Constants ¶
This section is empty.
Variables ¶
LockerProvider
Functions ¶
This section is empty.
Types ¶
type ILocker ¶
type ILocker interface { Lock(ctx context.Context, resource string) (*redsync.Mutex, error) TryLock(ctx context.Context, resource string, maxExpire, retryDelay time.Duration, tries int) (*redsync.Mutex, error) Unlock(ctx context.Context, mutex *redsync.Mutex) (bool, error) }
ILocker
Click to show internal directories.
Click to hide internal directories.