Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MutexPrefix = "mutex/"
View Source
var NonBlockingMutexPrefix = "non-blocking-mutex/"
Functions ¶
This section is empty.
Types ¶
type NonBlockingLocker ¶
type NonBlockingMutex ¶
type NonBlockingMutex struct { Key string // contains filtered or unexported fields }
func NewNonBlockingMutex ¶
func NewNonBlockingMutex(ctx context.Context, client *redis.Client, keySuffix string) *NonBlockingMutex
func (*NonBlockingMutex) TryLock ¶
func (m *NonBlockingMutex) TryLock() (bool, error)
func (*NonBlockingMutex) Unlock ¶
func (m *NonBlockingMutex) Unlock() error
func (*NonBlockingMutex) WithLockTimeout ¶
func (m *NonBlockingMutex) WithLockTimeout(d time.Duration) *NonBlockingMutex
Click to show internal directories.
Click to hide internal directories.