appupdate

package
v0.93.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package appupdate checks GitHub for a newer lich release and, on a Windows install no package manager owns, downloads and runs the release's installer. Everywhere else lich belongs to a package manager (a Linux package, Homebrew, Scoop), so this package only reports the update: the UI drives the install through that manager instead (see install.sh and the /restart endpoint), or points at the release page where it can name none.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

type Progress = api.AppUpdateProgress

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service reports lich's own update state and applies self-updates where the binary is writable.

func New

func New(version string, install func(string) error, emit func(name string, data any)) *Service

New returns a service that reports version as the running build and polls GitHub for the latest release. install runs a downloaded Windows installer; emit is the app's event hub.

func (*Service) Apply

func (s *Service) Apply(_ context.Context, _ api.None) (api.None, error)

Apply verifies the latest release's Windows installer against its SHA-256 checksum and hands the install over to it; the installer closes and relaunches lich. Only valid where CanSelfApply is true.

func (*Service) RequiredUpdate added in v0.87.0

func (s *Service) RequiredUpdate() error

RequiredUpdate is the error a new session is refused with while a release that marks itself required is pending, nil otherwise. It answers from the last lookup, whoever asked for it. A lookup that failed reports nothing required, as it reports no update, and a build that is not a release is never asked to update, so it looks nothing up.

func (*Service) Status

func (s *Service) Status(_ context.Context, _ api.None) (Status, error)

Status answers status over RPC.

type Status

type Status = api.AppUpdateStatus

Jump to

Keyboard shortcuts

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