update

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ReleasesBaseURL = "https://github.com/" + Repo + "/releases"

ReleasesBaseURL is the base URL for release downloads.

View Source
const Repo = "conn-castle/agent-layer"

Repo identifies the GitHub repository used for release checks.

Variables

This section is empty.

Functions

func IsRateLimitError added in v0.8.0

func IsRateLimitError(err error) bool

IsRateLimitError reports whether err represents a GitHub API rate-limit condition.

Types

type CheckResult

type CheckResult struct {
	Current      string
	Latest       string
	Outdated     bool
	CurrentIsDev bool
}

CheckResult captures the latest release check outcome.

func Check

func Check(ctx context.Context, currentVersion string) (CheckResult, error)

Check fetches the latest release and compares it to the currentVersion. It returns the normalized versions along with an outdated flag.

type RateLimitError added in v0.8.0

type RateLimitError struct {
	StatusCode int
	Status     string
	Remaining  *int
}

RateLimitError indicates GitHub's API rate limit was hit while checking for updates.

Callers should generally treat this as a best-effort failure and suppress/minimize output.

func (*RateLimitError) Error added in v0.8.0

func (e *RateLimitError) Error() string

Jump to

Keyboard shortcuts

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