| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Upstream
Description
A mount's configured upstreams, and the tarball-host gate and request bases derived from them, as one opaque cluster with a private constructor.
The TarballHostGate and each upstream's BaseRequest are derived once per
mount, so a request under an upstream appends its path to that parse. A gate that disagreed with
the URLs would authorise the wrong authorities, so mountUpstreams is the only builder and neither
the constructor nor the selectors are exported: an upstreams{...} update alone would break the set.
Synopsis
- data MirrorServePlan
- data MountUpstreams
- mountUpstreams :: [Text] -> Maybe RegistryUrl -> RegistryUrl -> MirrorServePlan -> MountUpstreams
- upstreamPrivateBaseUrl :: MountUpstreams -> Maybe RegistryUrl
- upstreamPublicBaseUrl :: MountUpstreams -> RegistryUrl
- upstreamPrivateBase :: MountUpstreams -> Maybe BaseRequest
- upstreamPublicBase :: MountUpstreams -> BaseRequest
- upstreamMirror :: MountUpstreams -> MirrorServePlan
- upstreamTarballHostGate :: MountUpstreams -> TarballHostGate
Mirror serve plan
data MirrorServePlan Source #
Whether an admitted public artifact is enqueued for the demand-driven mirror, and where that write lands. A serve-only mount opens no producer span and emits no enqueue metric.
Constructors
| MirrorOnAdmit RegistryUrl | Enqueue admitted public artifacts for publication to this mirror-target endpoint. The worker resolves its publish capability from the same configuration. |
| NoMirrorWrite | Serve-only: admitted public artifacts stream to the client and are mirrored nowhere. |
Instances
| Show MirrorServePlan Source # | |
Defined in Ecluse.Core.Server.Upstream Methods showsPrec :: Int -> MirrorServePlan -> ShowS # show :: MirrorServePlan -> String # showList :: [MirrorServePlan] -> ShowS # | |
| Eq MirrorServePlan Source # | |
Defined in Ecluse.Core.Server.Upstream Methods (==) :: MirrorServePlan -> MirrorServePlan -> Bool # (/=) :: MirrorServePlan -> MirrorServePlan -> Bool # | |
The upstream cluster
data MountUpstreams Source #
A mount's three configured upstreams and the tarball-host gate and request bases they derive. Exported abstract, so the carried gate and bases always derive from the carried URLs.
Instances
| Show MountUpstreams Source # | |
Defined in Ecluse.Core.Server.Upstream Methods showsPrec :: Int -> MountUpstreams -> ShowS # show :: MountUpstreams -> String # showList :: [MountUpstreams] -> ShowS # | |
| Eq MountUpstreams Source # | |
Defined in Ecluse.Core.Server.Upstream Methods (==) :: MountUpstreams -> MountUpstreams -> Bool # (/=) :: MountUpstreams -> MountUpstreams -> Bool # | |
mountUpstreams :: [Text] -> Maybe RegistryUrl -> RegistryUrl -> MirrorServePlan -> MountUpstreams Source #
Bind a mount's upstreams. This is the only caller of tarballHostGate
outside that gate's own specs, so the allowlist and the reference authorities have one derivation.
upstreamPrivateBaseUrl :: MountUpstreams -> Maybe RegistryUrl Source #
The private upstream base URL. Nothing when the mount has no private upstream, so
the private leg is structurally absent rather than misconfigured.
upstreamPublicBaseUrl :: MountUpstreams -> RegistryUrl Source #
The public upstream base URL.
upstreamPrivateBase :: MountUpstreams -> Maybe BaseRequest Source #
The private upstream base URL, parsed once for the requests under it.
upstreamPublicBase :: MountUpstreams -> BaseRequest Source #
The public upstream base URL, parsed once for the requests under it.
upstreamMirror :: MountUpstreams -> MirrorServePlan Source #
The mirror serve plan, carrying the mirror-target endpoint when there is one.
upstreamTarballHostGate :: MountUpstreams -> TarballHostGate Source #
The tarball-host gate of these upstreams: the canonicalised host:port allowlist and the
private and public reference authorities the per-request SSRF check decides against.