Runners now get created and cleaned up in scale sets. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
17 lines
362 B
Go
17 lines
362 B
Go
package locking
|
|
|
|
import "time"
|
|
|
|
// TODO(gabriel-samfira): needs owner attribute.
|
|
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)
|
|
}
|