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.
Click to show internal directories.
Click to hide internal directories.