github.com/diggerhq/digger/libs@v0.0.0-20240604170430-9d61cdf01cc5/locking/core.go (about) 1 package locking 2 3 type Lock interface { 4 Lock(transactionId int, resource string) (bool, error) 5 Unlock(resource string) (bool, error) 6 GetLock(resource string) (*int, error) 7 } 8 9 type ProjectLock interface { 10 Lock() (bool, error) 11 Unlock() (bool, error) 12 ForceUnlock() error 13 LockId() string 14 }