feat: add a label take precedence argument (#1754)

Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
jebabin 2023-09-16 17:13:41 +02:00 committed by GitHub
parent 1d5a8d9a4c
commit 650acde015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 236 additions and 93 deletions

View file

@ -52,7 +52,7 @@ type Container interface {
SafeImageID() ImageID
ImageName() string
Enabled() (bool, bool)
IsMonitorOnly() bool
IsMonitorOnly(UpdateParams) bool
Scope() (string, bool)
Links() []string
ToRestart() bool
@ -67,7 +67,7 @@ type Container interface {
VerifyConfiguration() error
SetStale(bool)
IsStale() bool
IsNoPull() bool
IsNoPull(UpdateParams) bool
SetLinkedToRestarting(bool)
IsLinkedToRestarting() bool
PreUpdateTimeout() int

View file

@ -6,11 +6,13 @@ import (
// UpdateParams contains all different options available to alter the behavior of the Update func
type UpdateParams struct {
Filter Filter
Cleanup bool
NoRestart bool
Timeout time.Duration
MonitorOnly bool
LifecycleHooks bool
RollingRestart bool
Filter Filter
Cleanup bool
NoRestart bool
Timeout time.Duration
MonitorOnly bool
NoPull bool
LifecycleHooks bool
RollingRestart bool
LabelPrecedence bool
}