ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.MirrorView

Description

Reconcile durable source fields against this caller's current private inventory.

Synopsis

Documentation

data MirrorView Source #

One configured target partitions a bounded store from every other target.

type MirrorRetention = RetentionOperations CacheKey (StateRevision, ProjectMirrorRecord, Int) Source #

This store holds source-derived records only, never private metadata or access decisions.

newMirrorView :: Limits -> StateTarget -> MirrorState -> MirrorRetention -> MirrorStateFormat -> MirrorDocuments -> MirrorView Source #

Bind a store dedicated to this target and its adapter's state format and document operations. Its pool must share the metadata retention budget.

mirrorViewDocuments :: MirrorView -> MirrorDocuments Source #

The bound adapter's operations for restoring and assembling managed documents.

newMirrorRetention :: LocalPool -> NominalDiffTime -> StoreBudget -> IO MirrorRetention Source #

TTL controls retention only. Every request still validates the retained revision.

mirrorRetentionWeight :: CacheKey -> StateRevision -> Int -> Int Source #

The revision bytes must be owned. Saturated entries remain uncacheable.

validateMirrorProject :: MirrorView -> MemoryTicket -> PackageName -> IO (Either MirrorStateFault (Maybe (StateRevision, ProjectMirrorRecord))) Source #

Call only after private authorisation. A cached absence or an unsolicited 304 cannot prove state.

mirrorProjectViews :: MirrorDocuments -> StateRevision -> ProjectMirrorRecord -> Maybe Manifest -> Either MirrorStateFault (Maybe Manifest, Maybe Manifest, Map Text MirrorVersion) Source #

Keep unmanaged packed input separate. All restored entries receive fresh project-wide coordinates.

mirrorVersionView :: MirrorDocuments -> Version -> ProjectMirrorRecord -> Maybe VersionDoc -> Either MirrorStateFault (Maybe VersionDoc) Source #

An unmanaged version keeps its existing path. A managed version requires the shared complete proof.

publicMirrorCoverage :: Map Text MirrorVersion -> PackageInfo -> Bool Source #

Public fallback must cover every retained expected file with matching identity after policy admission.

readMirrorCompanion :: MirrorView -> MemoryTicket -> ProjectMirrorRecord -> Version -> Text -> IO (Either MirrorStateFault ByteString) Source #

Read a retained declared companion only after the parent version passed current private proof.