| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Sweep.Types
Description
The mirror sweep's inputs, effects, and cycle state. Store operations arrive through Ecluse.Core.Registry.Maintenance handles.
Synopsis
- data SweepMount = SweepMount {
- smEcosystem :: Ecosystem
- smStore :: SweepStore
- smRules :: [PreparedRule]
- smConfigured :: [Rule]
- smRuleDeps :: RuleDeps
- smProjectName :: ProjectName
- smFirstParty :: PackageName -> Bool
- data SweepStore = SweepStore {}
- data SweepCache = SweepCache {}
- data SweepExecution
- deletingCache :: StoreMaintenance -> SweepCache
- previewCache :: StoreObservation -> SweepCache
- pairedStore :: Int -> SweepCache -> SweepCache -> SweepStore
- privateStore :: SweepStore -> SweepStore
- countingAt :: SweepStore -> StoreObservation -> SweepStore
- walkMarkerOf :: SweepStore -> Maybe StoreCursor
- data SweepPacing = SweepPacing {}
- minimumChunkPause :: NominalDiffTime
- deletionCapPerStore :: Int
- data SweepShape
- data SweepReport = SweepReport {}
- data SweepPorts = SweepPorts {}
- data SweepAudit = SweepAudit {}
- sweepTargetOf :: SweepMount -> StoreObservation -> SweepTarget
- locatedPorts :: SweepMount -> StoreObservation -> SweepPorts -> SweepPorts
- data SweepState = SweepState {}
- newSweepState :: IO SweepState
- record :: SweepPorts -> SweepState -> SweepResult -> IO ()
- recordMetric :: SweepPorts -> SweepResult -> IO ()
- recordTally :: SweepState -> SweepResult -> IO ()
- recordGap :: SweepState -> EvidenceGaps -> IO ()
- recordPrerequisites :: SweepState -> TargetPrerequisites -> IO ()
What a sweep runs over
data SweepMount Source #
One mount's sweepable store, and everything that decides for it.
Constructors
| SweepMount | |
Fields
| |
data SweepStore Source #
One mount's sweepable store, with the private cache it is always swept beside.
Constructors
| SweepStore | |
Fields
| |
data SweepCache Source #
One store's own two halves. A cache is paired with no further store, so it carries none.
Constructors
| SweepCache | |
Fields | |
data SweepExecution Source #
What a run does with a condemned version. Only one arm carries a write.
Constructors
| SweepRemoves StoreDeletion | Hand the versions to the store's own delete, and record each completed bucket. |
| SweepCounts | Count the versions and reach nothing that could change the store. |
deletingCache :: StoreMaintenance -> SweepCache Source #
The whole handle as a deleting run holds it: its reads, and its writes as the execution.
previewCache :: StoreObservation -> SweepCache Source #
The observing calls alone, as a preview holds them.
pairedStore :: Int -> SweepCache -> SweepCache -> SweepStore Source #
A mount's store: the mirror target's halves, its private cache, and the bound they share.
privateStore :: SweepStore -> SweepStore Source #
The mount's other store: its private cache, under the same pairing and bound.
countingAt :: SweepStore -> StoreObservation -> SweepStore Source #
The mount's store seen at one observation, counting only. A located view names its own backend in an audit line and reaches nothing that could change a store.
walkMarkerOf :: SweepStore -> Maybe StoreCursor Source #
The marker a full walk resumes from. A preview holds none, so its walk starts at the first bucket and the recorded marker is neither read nor replaced.
data SweepPacing Source #
How a sweep paces itself, how much one cycle may delete, and which shape it runs.
Constructors
| SweepPacing | |
Fields
| |
Instances
| Show SweepPacing Source # | |
Defined in Ecluse.Core.Registry.Sweep.Types Methods showsPrec :: Int -> SweepPacing -> ShowS # show :: SweepPacing -> String # showList :: [SweepPacing] -> ShowS # | |
| Eq SweepPacing Source # | |
Defined in Ecluse.Core.Registry.Sweep.Types | |
minimumChunkPause :: NominalDiffTime Source #
The shortest pause a sweep may be paced by, which the boot refuses beneath. Deletion is permanent, and the pause between chunks is what leaves time to stop a mistaken run.
deletionCapPerStore :: Int Source #
Versions one cycle may hand over per sweepable store, which the cap's default is computed from. A cycle covers every store in turn, so one pinned total would starve the later mounts.
data SweepShape Source #
Which names one cycle decides. A full walk is a superset of a candidate cycle, so the two never run beside each other.
Constructors
| SweepCandidates | Every store name the advisory database covers or an identity deny pins. It is bounded by the listing for store size and by advisory hits for reads. |
| SweepEverything | Every name in the store, bucket by bucket, resuming from the store's own cursor. It covers a rule-configuration change, which no candidate set can see. |
Instances
| Show SweepShape Source # | |
Defined in Ecluse.Core.Registry.Sweep.Types Methods showsPrec :: Int -> SweepShape -> ShowS # show :: SweepShape -> String # showList :: [SweepShape] -> ShowS # | |
| Eq SweepShape Source # | |
Defined in Ecluse.Core.Registry.Sweep.Types | |
data SweepReport Source #
How one run reports a removal, and whether its cap stops the cycle. A preview holds no delete at all, so the loop reads these rather than asking which mode it is in.
Constructors
| SweepReport | |
Fields
| |
data SweepPorts Source #
The effects the sweep reaches the running system through.
Constructors
| SweepPorts | |
Fields
| |
data SweepAudit Source #
Where the sweep reports. The two severities are separate fields rather than a level argument, so a caller cannot log a halt as routine.
Constructors
| SweepAudit | |
sweepTargetOf :: SweepMount -> StoreObservation -> SweepTarget Source #
Which of a mount's two locations a store is. The decision keys on the backend name, so a mount whose mirror store and private cache report one name reads as the mirror at both.
locatedPorts :: SweepMount -> StoreObservation -> SweepPorts -> SweepPorts Source #
The ports an audit line from one located store is written through, labelled and targeted.
The cycle's running state
data SweepState Source #
Cycle totals and pacing. The issued count bounds attempts, while the tally records outcomes.
Constructors
| SweepState | |
Fields
| |
newSweepState :: IO SweepState Source #
Start a cycle with no counts or pending chunk pause.
record :: SweepPorts -> SweepState -> SweepResult -> IO () Source #
Count one version's disposition, in the cycle tally and at the metrics port together.
recordMetric :: SweepPorts -> SweepResult -> IO () Source #
Count a target operation separately from a deduplicated logical preview tally.
recordTally :: SweepState -> SweepResult -> IO () Source #
Update the cycle tally without recording a second target operation.
recordGap :: SweepState -> EvidenceGaps -> IO () Source #
Record one gap in what this cycle could read.
recordPrerequisites :: SweepState -> TargetPrerequisites -> IO () Source #
Record one target's standing permissions, which only a preview reads rather than acts on.