| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Metadata.Fetch.Preparation
Description
Prepare metadata reads only after the caller selects an origin and its credentials.
Synopsis
- data PrepareRead = PrepareRead (OriginClient -> IO (Either MetadataError EcosystemRead))
- staticRead :: EcosystemRead -> PrepareRead
- prepareRead :: PrepareRead -> OriginClient -> IO (Either MetadataError EcosystemRead)
- presentedRead :: CredentialMapping -> PrepareRead -> PrepareRead
- bindToOrigin :: UrlFormationError -> Text -> EcosystemRead -> EcosystemRead
- canChargeFullReadWorkspace :: PrepareRead -> Bool
- prepareManifest :: PrepareRead -> ManifestFetch
- prepareVersion :: PrepareRead -> TracingPort -> OriginClient -> PackageName -> Version -> IO (Either MetadataError VersionRead)
Documentation
data PrepareRead Source #
Origin-bound factories may capture operation callbacks. Static factories receive no origin.
Constructors
| PrepareRead (OriginClient -> IO (Either MetadataError EcosystemRead)) |
staticRead :: EcosystemRead -> PrepareRead Source #
Reuse a reader that cannot bind callbacks from the selected origin.
prepareRead :: PrepareRead -> OriginClient -> IO (Either MetadataError EcosystemRead) Source #
Prepare a reader under the caller-selected origin's authority and limits.
presentedRead :: CredentialMapping -> PrepareRead -> PrepareRead Source #
Present the reader's credential under mapping through presentedRequest. A static reader
stays static, and the reader's own request checks still run.
bindToOrigin :: UrlFormationError -> Text -> EcosystemRead -> EcosystemRead Source #
Hold a prepared reader to the origin at root: a request under another base is refused with
refusal, and a finish located against another base is undecodable.
canChargeFullReadWorkspace :: PrepareRead -> Bool Source #
Whether preparation can bind the selected origin's full-read workspace callback into its reader.
prepareManifest :: PrepareRead -> ManifestFetch Source #
Prepare within the full-read operation, so cache hits need no preparation.
prepareVersion :: PrepareRead -> TracingPort -> OriginClient -> PackageName -> Version -> IO (Either MetadataError VersionRead) Source #
Prepare independently for each selected-read operation under its actual credentials.