updater

package
v0.149.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireUpdateLifecycleLock

func AcquireUpdateLifecycleLock() (*os.File, error)

func FetchReleaseChecksum

func FetchReleaseChecksum(ctx context.Context, manifestURL, binaryName string) (string, error)

func ReleaseAssetName

func ReleaseAssetName() string

func ReleaseHTTPClient

func ReleaseHTTPClient(timeout time.Duration) *http.Client

func ReleaseMetadataURL

func ReleaseMetadataURL() string

Stable's latest feed deliberately excludes GitHub prereleases. Preview has a separate prerelease selection and asset namespace; publication is a later act.

func UpdatePreviewFile

func UpdatePreviewFile(ctx context.Context, source, manifest string) (runErr error)

func ValidateReleaseAssetURL

func ValidateReleaseAssetURL(raw string) error

func ValidateReleaseBinary

func ValidateReleaseBinary(ctx context.Context, path string) error

func ValidateUpdateTarget

func ValidateUpdateTarget() error

Types

type DaemonUpdateState

type DaemonUpdateState struct {
	Pid       int
	Kind      daemonctl.DaemonKind
	StartArgs []string
}

func DaemonStateForUpdate

func DaemonStateForUpdate() (*DaemonUpdateState, error)

daemonStateForUpdate snapshots and validates the restart command while the lifecycle lock is held. In particular, an update must not stop a live daemon and only then discover that its saved restart metadata is missing or corrupt.

type GhAsset

type GhAsset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
}

type GhRelease

type GhRelease struct {
	TagName    string    `json:"tag_name"`
	Assets     []GhAsset `json:"assets"`
	Prerelease bool      `json:"prerelease"`
	Draft      bool      `json:"draft"`
}

func DecodeChannelRelease

func DecodeChannelRelease(body io.Reader) (GhRelease, error)

Jump to

Keyboard shortcuts

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