application

package
v0.16.1 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: 5 Imported by: 0

Documentation

Overview

Package application measures a TinyGo release archive against the digest GitHub publishes for it, serving a held measurement when there is one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acquirer

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

Acquirer measures release archives. It never fails: a leg that cannot run is a measurement whose outcome says so, with the reason.

func NewAcquirer

func NewAcquirer(index ports.ReleaseIndex, archive ports.ArchiveReader, store ports.Store, clock ports.Clock, logger *slog.Logger) *Acquirer

NewAcquirer wires an acquirer that reaches GitHub on a miss. A nil store keeps nothing and serves nothing.

func NewOfflineAcquirer

func NewOfflineAcquirer(store ports.Store, clock ports.Clock, logger *slog.Logger) *Acquirer

NewOfflineAcquirer wires an acquirer that serves held measurements and reaches nothing.

func (*Acquirer) Acquire

func (a *Acquirer) Acquire(ctx context.Context, version, goos, goarch string, force bool) domain.Measurement

Acquire returns the measurement of version's archive for goos/goarch: the held one unless force is set, otherwise a new one, which is kept unless it only says the release could not be reached. force does not reach the network offline.

Jump to

Keyboard shortcuts

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