autoupdate

package
v0.0.63 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinalizeStagedWindowsUpdate

func FinalizeStagedWindowsUpdate() error

FinalizeStagedWindowsUpdate attempts to apply a previously staged Windows update. It is safe to call on non-Windows platforms (no-op) and errors are returned for callers who wish to handle them. Most callers can ignore the error.

func MaybeStartBackgroundUpdate

func MaybeStartBackgroundUpdate(ctx context.Context, currentVersion string)

func PerformUpdate

func PerformUpdate(ctx context.Context, src Source, useSudo bool) error

PerformUpdate downloads, verifies and installs the target version. When src.AssetURL is empty, the updater falls back to GitHub releases using src.ReleaseTag.

Types

type Source

type Source struct {
	Version      string
	ReleaseTag   string
	AssetURL     string
	AssetName    string
	Checksum     string
	ChecksumURL  string
	Channel      string
	ExpectedSize int64
}

Source describes where an update should be downloaded from. When AssetURL is provided, the updater downloads directly from that URL. Otherwise, ReleaseTag (or Version) is used to locate the asset on GitHub.

Jump to

Keyboard shortcuts

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