releasecheck

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package releasecheck asks GitHub, about once a day, for the latest MemSpace release, so the web UI can tell the administrator about a newer server. It only reports; nothing is downloaded or installed.

Index

Constants

View Source
const (
	Interval   = 24 * time.Hour
	RetryAfter = time.Hour
)

Interval between checks, and between retries after a failed one.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	// URL redirects to the latest release's page (.../releases/tag/<tag>).
	// The web URL is used rather than the API, which limits requests
	// without a token per IP address (shared behind proxies and NAT).
	URL  string
	HTTP *http.Client
	Logf func(format string, a ...any)
	// contains filtered or unexported fields
}

Checker holds the latest release seen.

func New

func New(logf func(string, ...any)) *Checker

New returns a Checker for the MemSpace repository.

func (*Checker) Check

func (c *Checker) Check(ctx context.Context) error

Check asks GitHub once.

func (*Checker) Latest

func (c *Checker) Latest() string

Latest is the latest release tag seen ("" before the first successful check). A nil Checker has none.

func (*Checker) Run

func (c *Checker) Run(ctx context.Context)

Run checks now and then every Interval until ctx ends.

Jump to

Keyboard shortcuts

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