| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Publish
Description
The mirror-write capability: a shared transport, an adapter-provided protocol codec, and the
married MirrorPublish handle a worker bundle carries. A new ecosystem contributes a codec and
never a transport.
The transport mints the bearer per call and re-seals every request, so no codec can ship a write that follows a redirect.
Synopsis
- data PublishPlan = PublishPlan {}
- data PublishCodec = PublishCodec {
- pcProbeRequest :: Text -> Maybe Secret -> PackageName -> Either UrlFormationError Request
- pcVersionListParser :: Limits -> Parser VersionListItem
- pcPublishRequest :: Text -> Maybe Secret -> PackageName -> PublishPlan -> MirrorArtifact -> ByteString -> Either PublishFault Request
- pcPublishOutcome :: Int -> Either PublishFault ()
- fetchVersionList :: Manager -> Limits -> Parser VersionListItem -> Request -> IO (Either FetchFault (BodyOutcome (Either ParseError [Version])))
- data MirrorTransport = MirrorTransport {}
- data MirrorPublish = MirrorPublish {
- mpProbeMetadata :: PackageName -> IO (Either FetchFault (BodyOutcome (Either ParseError [Version])))
- mpPublishArtifact :: PackageName -> PublishPlan -> MirrorArtifact -> ByteString -> IO (Either PublishFault ())
- newMirrorPublish :: MirrorTransport -> RegistryUrl -> PublishCodec -> MirrorPublish
What one write declares
data PublishPlan Source #
What one mirror write declares: the version, the release tag the store must carry once it lands, and the version's own metadata. The caller decides the tag, so no codec derives one.
Constructors
| PublishPlan | |
Instances
| Show PublishPlan Source # | |
Defined in Ecluse.Core.Registry.Publish Methods showsPrec :: Int -> PublishPlan -> ShowS # show :: PublishPlan -> String # showList :: [PublishPlan] -> ShowS # | |
| Eq PublishPlan Source # | |
Defined in Ecluse.Core.Registry.Publish | |
The adapter's protocol codec
data PublishCodec Source #
One ecosystem's mirror-write protocol, all pure. The endpoint and bearer arrive as arguments, so a codec holds no URL, credential, or connection state.
Constructors
| PublishCodec | |
Fields
| |
fetchVersionList :: Manager -> Limits -> Parser VersionListItem -> Request -> IO (Either FetchFault (BodyOutcome (Either ParseError [Version]))) Source #
Read a codec's identifiers inside the response lifetime, preserving transport and HTTP outcomes.
The shared transport
data MirrorTransport Source #
The ecosystem-agnostic half of the mirror write. The composition root builds one per marriage from process-wide parts.
Constructors
| MirrorTransport | |
Fields
| |
The married capability
data MirrorPublish Source #
What one worker bundle carries, bound to one mirror-target endpoint under one credential mint. The worker never sees the codec, the transport, or the adapter.
Constructors
| MirrorPublish | |
Fields
| |
newMirrorPublish :: MirrorTransport -> RegistryUrl -> PublishCodec -> MirrorPublish Source #
Marry a protocol codec to the shared transport against one mirror-target endpoint.