ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Pilot

Synopsis

Documentation

runPilot :: BootEnv -> IO () Source #

The entry point for the Pilot worker mode. Pilot runs as a standalone HTTP server that only exposes liveness and readiness probes. Its actual worker loop will ingest advisory databases.

pilotApplication :: ServerConfig -> IO Application Source #

The WAI application for the Pilot worker mode. It exposes liveness and readiness probes.

One-shot compilation

data PilotCompileOptions Source #

Options for the one-shot runPilotCompile mode: which ecosystem's export to compile, where to fetch it from, and where the artifact lands.

Constructors

PilotCompileOptions 

Fields

runPilotCompile :: LogEnv -> Telemetry -> AppConfig -> PilotCompileOptions -> IO FilePath Source #

Run a single OSV compilation, optionally upload it, and return the artifact's path.

The same bounded-retry pipeline the export loop runs, without the loop or the probe server: point it at an export (or a stub serving a fixture zip) and it writes the artifact into the requested directory, then uploads it when pcoUpload asks for one full sync cycle. A source that cannot be fetched or parsed propagates as an exception, so the process exits non-zero, which makes the command safe to script and to schedule.

data PilotUploadUnconfigured Source #

Requesting an upload without a configured vulnerability-database bucket.

This is a wiring fault at the composition root: there is no per-run decision a caller could make about it, so it throws rather than returning a value the caller could only re-raise.