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

17 lines
338 B
Go

package locking
import "time"
// TODO(gabriel-samfira): needs owner attribute.
type Locker interface {
TryLock(key string) bool
Lock(key string)
Unlock(key string, remove bool)
Delete(key string)
}
type InstanceDeleteBackoff interface {
ShouldProcess(key string) (bool, time.Time)
Delete(key string)
RecordFailure(key string)
}