ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.Pipeline.Tarball.Public

Description

Gate public artifacts through the worker's admission oracle. An admitted GET enqueues mirroring.

Synopsis

Documentation

servePublicArtifact :: ArtifactRequest response -> Handler ResponseReceived Source #

Gate the requested version under the mount's admission budget, then relay it.

servePublicArtifactWithCoverage :: (Maybe PackageDetails -> Bool) -> ArtifactRequest response -> Handler ResponseReceived Source #

A managed fallback must cover the whole expected version before its requested file is admitted. The predicate on Nothing says whether a public miss settles the version.

The public artifact gate (exposed for direct testing)

data PublicArtifactGate Source #

Preserve the admitted artifact's authoritative location through the public gate.

Constructors

Admitted Artifact [SkippedCheck]

The gate admitted the version: the artifact selected by filename, and the checks the admission skipped.

Refused ServeDecision

The gate refused the version: a policy denial, an upstream outage, or absence.

publicArtifactGate :: PackageDetails -> ArtifactAdmission -> [SkippedCheck] -> PublicArtifactGate Source #

Render the shared admission verdict on the serve surface.