ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Pilot

Description

The Pilot role's front door. Every decision it acts on is planned before it starts, in Ecluse.Pilot.Plan and the boot arm that spends the plan's refusal, so what is left here is the effect each plan names.

Synopsis

Documentation

runPilot :: BootEnv -> ExportLoopPlan -> IO () Source #

The entry point for the Pilot worker mode. The export loop never returns, so the server's graceful return on shutdown must cancel it, resuming from the remote artifact next boot.

runExportLoop :: (MonadMask m, MonadUnliftIO m, KatipContext m) => Telemetry -> Maybe AwsEndpoint -> Config -> ExportLoopPlan -> m () Source #

Run the loop the boot planned, never returning. Every fault inside a cycle is transient, because a cycle has no wiring fault to fail up on.

superviseExportCycles :: (MonadUnliftIO m, KatipContext m) => BackoffSchedule -> NonEmpty ExportTarget -> (ExportTarget -> m ()) -> m () Source #

Run one supervised cycle loop per ecosystem, side by side. Each keeps its own backoff, so a feed that fails costs its own cadence and holds back no other ecosystem's artifact.

One-shot compilation

data PilotCompileOptions Source #

Options for the one-shot ecluse pilot compile mode.

Constructors

PilotCompileOptions 

Fields

runPilotCompile :: LogEnv -> Telemetry -> Maybe AwsEndpoint -> Config -> PilotCompileOptions -> IO FilePath Source #

Run a single OSV compilation, optionally upload the artifact, and return its path. An OSV failure or a required EPSS failure propagates, so the command exits non-zero and stays scriptable.

data PilotUploadUnconfigured Source #

Requesting an upload without a configured advisory store. It is a wiring fault at the composition root, so it throws rather than returning a value the caller could only re-raise.