mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
fix(lifecycle): cleanup lifecycle
- removes unwieldy SkipUpdate return value in favor of errors.Is - generalizes the code for all four phases - allows timeout to be defined for all phases - enables explicit unit in timeout label values (in addition to implicit minutes)
This commit is contained in:
parent
76f9cea516
commit
023c1a7d93
10 changed files with 160 additions and 179 deletions
|
|
@ -2,6 +2,7 @@ package types
|
|||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
dc "github.com/docker/docker/api/types/container"
|
||||
|
|
@ -60,18 +61,14 @@ type Container interface {
|
|||
StopSignal() string
|
||||
HasImageInfo() bool
|
||||
ImageInfo() *types.ImageInspect
|
||||
GetLifecyclePreCheckCommand() string
|
||||
GetLifecyclePostCheckCommand() string
|
||||
GetLifecyclePreUpdateCommand() string
|
||||
GetLifecyclePostUpdateCommand() string
|
||||
GetLifecycleCommand(LifecyclePhase) string
|
||||
GetLifecycleTimeout(LifecyclePhase) time.Duration
|
||||
VerifyConfiguration() error
|
||||
SetStale(bool)
|
||||
IsStale() bool
|
||||
IsNoPull(UpdateParams) bool
|
||||
SetLinkedToRestarting(bool)
|
||||
IsLinkedToRestarting() bool
|
||||
PreUpdateTimeout() int
|
||||
PostUpdateTimeout() int
|
||||
IsRestarting() bool
|
||||
GetCreateConfig() *dc.Config
|
||||
GetCreateHostConfig() *dc.HostConfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue