-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): swap viper and cobra for config (#684)
- Loading branch information
Showing
12 changed files
with
229 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package flags | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// WatchConfig is the global watchtower configuration created from flags and environment variables | ||
type WatchConfig struct { | ||
Interval int | ||
Schedule string | ||
NoPull bool `mapstructure:"no-pull"` | ||
NoRestart bool `mapstructure:"no-restart"` | ||
NoStartupMessage bool `mapstructure:"no-startup-message"` | ||
Cleanup bool | ||
RemoveVolumes bool `mapstructure:"remove-volumes"` | ||
EnableLabel bool `mapstructure:"label-enable"` | ||
Debug bool | ||
Trace bool | ||
MonitorOnly bool `mapstructure:"monitor-only"` | ||
RunOnce bool `mapstructure:"run-once"` | ||
IncludeStopped bool `mapstructure:"include-stopped"` | ||
IncludeRestarting bool `mapstructure:"include-restarting"` | ||
ReviveStopped bool `mapstructure:"revive-stopped"` | ||
LifecycleHooks bool `mapstructure:"enable-lifecycle-hooks"` | ||
RollingRestart bool `mapstructure:"rolling-restart"` | ||
HTTPAPI bool `mapstructure:"http-api"` | ||
HTTPAPIToken string `mapstructure:"http-api-token"` | ||
Timeout time.Duration `mapstructure:"stop-timeout"` | ||
Scope string | ||
NoColor bool `mapstructure:"no-color"` | ||
} |
Oops, something went wrong.