origin

package
v1.26.1 Latest Latest
Warning

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

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

Documentation

Overview

Package origin centralises every URL lerd fetches its own assets from (release binaries, framework store, changelog, GHCR base images) and owns the geodro->lerd-env move: old org first, new as fallback, flipping on a new-org hit.

Index

Constants

This section is empty.

Variables

View Source
var Default = New()

Default is the process-wide Links used by the package-level helpers.

Functions

func BaseImageRefs

func BaseImageRefs(phpShort, hash string) []string

func ChangelogURLs

func ChangelogURLs() []string

func NoteFetched

func NoteFetched(base string)

func ReleaseAPIBaseURLs

func ReleaseAPIBaseURLs() []string

func ReleaseBaseURLs

func ReleaseBaseURLs() []string

func ReleaseDownloadBases

func ReleaseDownloadBases() []string

func StoreBaseURLs

func StoreBaseURLs() []string

Package-level helpers delegate to Default.

Types

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

Links is the centralized handler for lerd's distribution URLs and the old->new org switch. The zero value is not usable; use New or Default.

func New

func New() *Links

New builds a Links with the geodro (old) and lerd-env (new) coordinates, preferring old first unless LERD_DISTRIBUTION_ORG says otherwise.

func (*Links) BaseImageRefs

func (l *Links) BaseImageRefs(phpShort, hash string) []string

BaseImageRefs lists GHCR refs for a prebuilt PHP-FPM base image in priority order, where phpShort is the dotless version (e.g. "85") and hash pins the image to the embedded Containerfile template.

func (*Links) ChangelogURLs

func (l *Links) ChangelogURLs() []string

ChangelogURLs lists raw changelog URLs in priority order.

func (*Links) NoteFetched

func (l *Links) NoteFetched(base string)

NoteFetched flips to serving the new org first the first time a real request succeeds against a new-org URL (e.g. once the old org is retired). One-way, old->new only; no probe, no timer.

func (*Links) PreferNew

func (l *Links) PreferNew() bool

PreferNew reports whether the new (lerd-env) org is served first.

func (*Links) ReleaseAPIBaseURLs

func (l *Links) ReleaseAPIBaseURLs() []string

ReleaseAPIBaseURLs lists GitHub API bases in priority order.

func (*Links) ReleaseBaseURLs

func (l *Links) ReleaseBaseURLs() []string

ReleaseBaseURLs lists GitHub releases bases in priority order.

func (*Links) ReleaseDownloadBases

func (l *Links) ReleaseDownloadBases() []string

ReleaseDownloadBases lists release-asset download bases in priority order.

func (*Links) SetPreferNew

func (l *Links) SetPreferNew(v bool)

SetPreferNew sets which org is served first.

func (*Links) StoreBaseURLs

func (l *Links) StoreBaseURLs() []string

StoreBaseURLs lists framework-store bases in priority order.

Jump to

Keyboard shortcuts

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