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 ¶
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.