garm/locking/interface.go
Gabriel Adrian Samfira 884be62a4d Fix lint errors
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-05-03 22:29:40 +00:00

16 lines
313 B
Go

package locking
import "time"
type Locker interface {
TryLock(key, identifier string) bool
Lock(key, identifier string)
Unlock(key string, remove bool)
Delete(key string)
}
type InstanceDeleteBackoff interface {
ShouldProcess(key string) (bool, time.Time)
Delete(key string)
RecordFailure(key string)
}