Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker interface {
// Lock acquires the lock, blocking until it's available or context is cancelled.
Lock(ctx context.Context) error
// TryLock attempts to acquire the lock without blocking.
// Returns true if the lock was acquired, false otherwise.
TryLock(ctx context.Context) (bool, error)
// Unlock releases the lock.
Unlock(ctx context.Context) error
}
Locker represents a distributed lock that can be acquired and released.
Click to show internal directories.
Click to hide internal directories.