ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

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

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 

Fields

  • ppVersion :: Version

    The version these bytes publish.

  • ppLatest :: Version

    Always a version the store holds after this write, the published one when it is alone.

  • ppMetadata :: CachedDoc

    Supported source fields paired with the release admitted for mirroring.

Instances

Instances details
Show PublishPlan Source # 
Instance details

Defined in Ecluse.Core.Registry.Publish

Eq PublishPlan Source # 
Instance details

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

  • ptManager :: Manager

    The trusted-path connection manager the worker dials the mirror target through.

  • ptMintToken :: IO (Maybe Secret)

    Nothing caches it here: refresh, expiry, and breaker policy live behind the action.

  • ptLimits :: Limits

    The response bound every exchange with the mirror target is held to (fail-closed).

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.