autoupdate

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinalizeStagedWindowsUpdate

func FinalizeStagedWindowsUpdate() error

func MaybeRunWindowsUpdateHelper added in v0.0.12

func MaybeRunWindowsUpdateHelper() bool

MaybeRunWindowsUpdateHelper is a no-op on non-Windows platforms.

func MaybeStartBackgroundUpdate

func MaybeStartBackgroundUpdate(ctx context.Context, currentVersion string)

func PerformUpdate

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

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

func TryFinalizeStagedUpdateImmediately added in v0.0.12

func TryFinalizeStagedUpdateImmediately(ctx context.Context, exePath string) (bool, error)

TryFinalizeStagedUpdateImmediately is only implemented on Windows; this stub should never be called on other platforms.

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