notification

package
v0.68.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionChecker

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

func NewVersionChecker

func NewVersionChecker(commandName string, cliOptions *flag.Options) *VersionChecker

NewVersionChecker creates a new VersionChecker with the default updates API URL.

func (*VersionChecker) Announcements

func (v *VersionChecker) Announcements() []announcement

func (*VersionChecker) CurrentVersion added in v0.64.0

func (v *VersionChecker) CurrentVersion() (semver.Version, error)

func (*VersionChecker) LatestVersion

func (v *VersionChecker) LatestVersion() (semver.Version, error)

func (*VersionChecker) PrintNotices

func (v *VersionChecker) PrintNotices(ctx context.Context, output io.Writer)

PrintNotices prints any announcements or warnings to the output writer, most likely stderr

func (*VersionChecker) RunUpdateCheck

func (v *VersionChecker) RunUpdateCheck(ctx context.Context)

RunUpdateCheck makes a best efforts request to determine the latest version and any announcements Logic: 1. if skipUpdateCheck is true AND telemetryDisabled are both true, skip the request 2. if skipUpdateCheck is true AND telemetryDisabled is false, run check with metric details but suppress output 3. if skipUpdateCheck is false AND telemetryDisabled is true, run update check but don't send any metric identifiers

func (*VersionChecker) Warnings

func (v *VersionChecker) Warnings() []string

Jump to

Keyboard shortcuts

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