updates

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package updates contains logic for checking if an update is available for ToolHive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldSkipUpdateChecks added in v0.2.3

func ShouldSkipUpdateChecks() bool

ShouldSkipUpdateChecks returns true if update checks should be skipped. This includes CI environments and other scenarios where automated update checking is undesirable.

Types

type UpdateChecker

type UpdateChecker interface {
	// CheckLatestVersion checks if a new version of ToolHive is available
	// and prints the result to the console.
	CheckLatestVersion() error
}

UpdateChecker is an interface for checking if a new version of ToolHive is available.

func NewUpdateChecker

func NewUpdateChecker(versionClient VersionClient) (UpdateChecker, error)

NewUpdateChecker creates a new instance of UpdateChecker.

type VersionClient

type VersionClient interface {
	GetLatestVersion(instanceID string, currentVersion string) (string, error)
	GetComponent() string
}

VersionClient is an interface for calling the update service API.

func NewVersionClient

func NewVersionClient() VersionClient

NewVersionClient creates a new instance of VersionClient.

func NewVersionClientForComponent added in v0.1.8

func NewVersionClientForComponent(component, version string, uiReleaseBuild bool) VersionClient

NewVersionClientForComponent creates a new instance of VersionClient for a specific component.

Jump to

Keyboard shortcuts

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