update

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Repository string
	Version    string
}

type Service

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

Service periodically checks api.autobrr.com for new qui releases and caches the latest result.

func NewService

func NewService(log zerolog.Logger, enabled bool, currentVersion, userAgent string) *Service

NewService creates a new update Service instance.

func (*Service) CheckUpdateAvailable

func (s *Service) CheckUpdateAvailable(ctx context.Context) (*version.Release, error)

CheckUpdateAvailable performs an update check and returns the new release if one is available.

func (*Service) CheckUpdates

func (s *Service) CheckUpdates(ctx context.Context)

CheckUpdates triggers a refresh of the latest release information if updates are enabled.

func (*Service) GetLatestRelease

func (s *Service) GetLatestRelease(_ context.Context) *version.Release

GetLatestRelease returns the last known release if a newer version has been found.

func (*Service) SetEnabled

func (s *Service) SetEnabled(enabled bool)

SetEnabled toggles whether periodic update checks should run.

func (*Service) Start

func (s *Service) Start(ctx context.Context)

Start launches a background loop that periodically checks for updates while the context is active.

type Updater

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

func NewUpdater

func NewUpdater(config Config) *Updater

func (*Updater) Run

func (u *Updater) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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