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 ¶
- Variables
- func BaseImageRefs(phpShort, hash string) []string
- func ChangelogURLs() []string
- func NoteFetched(base string)
- func ReleaseAPIBaseURLs() []string
- func ReleaseBaseURLs() []string
- func ReleaseDownloadBases() []string
- func StoreBaseURLs() []string
- type Links
- func (l *Links) BaseImageRefs(phpShort, hash string) []string
- func (l *Links) ChangelogURLs() []string
- func (l *Links) NoteFetched(base string)
- func (l *Links) PreferNew() bool
- func (l *Links) ReleaseAPIBaseURLs() []string
- func (l *Links) ReleaseBaseURLs() []string
- func (l *Links) ReleaseDownloadBases() []string
- func (l *Links) SetPreferNew(v bool)
- func (l *Links) StoreBaseURLs() []string
Constants ¶
This section is empty.
Variables ¶
var Default = New()
Default is the process-wide Links used by the package-level helpers.
Functions ¶
func BaseImageRefs ¶
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
Types ¶
type Links ¶
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 ¶
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 ¶
ChangelogURLs lists raw changelog URLs in priority order.
func (*Links) NoteFetched ¶
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) ReleaseAPIBaseURLs ¶
ReleaseAPIBaseURLs lists GitHub API bases in priority order.
func (*Links) ReleaseBaseURLs ¶
ReleaseBaseURLs lists GitHub releases bases in priority order.
func (*Links) ReleaseDownloadBases ¶
ReleaseDownloadBases lists release-asset download bases in priority order.
func (*Links) SetPreferNew ¶
SetPreferNew sets which org is served first.
func (*Links) StoreBaseURLs ¶
StoreBaseURLs lists framework-store bases in priority order.