ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Dredger

Description

Run the supervised Dredger cycle, advisory synchronisation, and health probes. Ecluse.Core.Registry.Sweep owns the selection and execution decisions.

Synopsis

Documentation

runDredger :: BootEnv -> DredgerOptions -> PrunerWiring -> IO (Maybe Text) Source #

Run the Dredger. Under --once the sweep returns and the race ends with it, carrying what that cycle ended on, which is what makes the role scriptable.

withSyncTasks :: [IO ()] -> IO a -> IO a Source #

Run the sweep with the advisory sync tasks beside it. The sweep alone decides when the run ends, and a task that faults still brings the run down with it.

dredgerServerConfig :: AppConfig -> IO Readiness -> ServerConfig Source #

The Dredger's health surface: the shared server.port, and a readiness the advisory sync opens and a latched halt closes for good. A latch never fails liveness, so nothing restarts it.

dredgerReady :: IO Readiness -> IO (Maybe CycleHalt) -> IO Readiness Source #

The advisory sync's own verdict until a halt latches, and Latched for good after one. Liveness stays untouched, because a restart would begin sweeping the generation that latched it.

latchedStep :: SweepPacing -> SweepPorts -> [SweepMount] -> IORef (Maybe CycleHalt) -> IO () Source #

One step of the cycling Dredger: run a cycle, or report the halt that latched instead, then wait the cycle pause. A latched Dredger touches no store and keeps reporting until it is restarted.