github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/lock/lock.go (about) 1 package lock 2 3 import "context" 4 5 // DistributedLock is a lock based on something 6 type DistributedLock interface { 7 Lock(ctx context.Context) (context.Context, error) 8 TryLock(ctx context.Context) (context.Context, error) 9 Unlock(ctx context.Context) error 10 }