update

package
v0.0.0-...-cc86db0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotUpdating              = "NotUpdating"
	UpdateReasonBoot         = "Boot"
	UpdateReasonPeriod       = "Periodic"
	UpdateReasonKickRollback = "KickRollback"
	UpdateReasonKickupgrade  = "KickUpgrade"
)
View Source
const (
	// DefaultCheckIntervalSeconds is the default interval for update check timer
	DefaultCheckIntervalSeconds = 1800
)
View Source
const (
	// MaximumCheckUpdateRetries is the maximum retry count for checking update
	MaximumCheckUpdateRetries = 3
)

Variables

View Source
var (
	ErrPreparationTimeout   = errors.New("Updating preparation phase timeout")
	ErrUpdatorNotFound      = errors.New("Updator is required but not found")
	ErrUpdatorNotExecutable = errors.New("Updator is not executable")
	ErrUpdateIsDisabled     = errors.New("Updating is disabled")
)

Functions

func ExecuteUpdateScriptRunner

func ExecuteUpdateScriptRunner(updateScriptPath string)

func InitCheckUpdateTimer

func InitCheckUpdateTimer() error

func IsCPUIntensiveActionRunning

func IsCPUIntensiveActionRunning() bool

IsCPUIntensiveActionRunning returns cpuIntensiveActionRunning flag as boolean variable

func IsCriticalActionRunning

func IsCriticalActionRunning() bool

IsCriticalActionRunning returns criticalActionRunning flag as boolean variable

func RollbackWithLocalDir

func RollbackWithLocalDir(newVersion string, updateReason string) error

func SafeBootstrapUpdate

func SafeBootstrapUpdate(preparationTimeout time.Duration, maximumDownloadTimeout time.Duration) error

func SafeUpdate

func SafeUpdate(preparationTimeout time.Duration, maximumDownloadTimeout time.Duration, updateReason string) error

SafeUpdate checks update information and running tasks before invoking updator

func TriggerUpdateCheck

func TriggerUpdateCheck()

TriggerUpgrade triggers doCheck() by call timer.SkipWaiting()

func UpgradeWithLocalDir

func UpgradeWithLocalDir(newVersion string, updateReason string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL