lock
API
lock
packageAPI reference for the lock
package.
Imports
(2)
I
interface
Locker
Locker defines the interface for distributed or local locks.
pkg/lock/locker.go:15-25
type Locker interface
Example
// Assuming a RedisLocker implementation
locker := NewRedisLocker(redisClient)
locker.Acquire(ctx, "my-resource", 5*time.Second)