mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
added AutoUpdate to config
This commit is contained in:
parent
2806260f5c
commit
ee8bcd5597
@ -22,6 +22,13 @@ type Version struct {
|
||||
// CheckPeriod is the time duration over which the update check will not be performed
|
||||
// (Note: cannot use time.Duration because marshalling with json breaks it)
|
||||
CheckPeriod string
|
||||
|
||||
// AutoUpdate is optional and has these these options:
|
||||
// - "never" do not auto-update
|
||||
// - "patch" auto-update on new patch versions
|
||||
// - "minor" auto-update on new minor (or patch) versions (Default)
|
||||
// - "major" auto-update on any new version
|
||||
AutoUpdate string
|
||||
}
|
||||
|
||||
// supported Version.Check values
|
||||
@ -36,6 +43,14 @@ const (
|
||||
CheckIgnore = "ignore"
|
||||
)
|
||||
|
||||
// supported Version.AutoUpdate values
|
||||
const (
|
||||
UpdateNever = "never"
|
||||
UpdatePatch = "patch"
|
||||
UpdateMinor = "minor"
|
||||
UpdateMajor = "major"
|
||||
)
|
||||
|
||||
// defaultCheckPeriod governs h
|
||||
var defaultCheckPeriod = time.Hour * 48
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user