updatechecker

package
v1.108.11 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(a *apptypes.App, updateCheckerSpec string) error

Configure will check if the app has scheduled update checks enabled and: if enabled, and cron job was NOT found: add a new cron job to check app updates if enabled, and a cron job was found, update the existing cron job with the latest cron spec if disabled: stop the current running cron job (if exists) no-op for airgap applications

func Start

func Start() error

Start will start the update checker the frequency of those update checks are app specific and can be modified by the user

func Stop

func Stop(appID string)

Stop will stop a running cron job (if exists) for a specific app

Types

type CheckForUpdatesOpts

type CheckForUpdatesOpts struct {
	AppID                  string
	DeployLatest           bool
	DeployVersionLabel     string
	IsAutomatic            bool
	SkipPreflights         bool
	SkipCompatibilityCheck bool
	IsCLI                  bool
	Wait                   bool
}

type UpdateCheckRelease

type UpdateCheckRelease struct {
	Sequence int64
	Version  string
}

type UpdateCheckResponse

type UpdateCheckResponse struct {
	AvailableUpdates  int64
	CurrentRelease    *UpdateCheckRelease
	AvailableReleases []UpdateCheckRelease
	DeployingRelease  *UpdateCheckRelease
}

func CheckForUpdates

func CheckForUpdates(opts CheckForUpdatesOpts) (ucr *UpdateCheckResponse, finalError error)

CheckForUpdates checks, downloads, and makes sure the desired version for a specific app is deployed. if "DeployLatest" is set to true, the latest version will be deployed. otherwise, if "DeployVersionLabel" is set to true, then the version with the corresponding version label will be deployed (if found). otherwise, if "IsAutomatic" is set to true (which means it's an automatic update check), then the version that matches the auto deploy configuration (if enabled) will be deployed. returns the number of available updates.

Jump to

Keyboard shortcuts

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