| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Pilot
Contents
Synopsis
- runPilot :: BootEnv -> IO ()
- pilotApplication :: ServerConfig -> IO Application
- data PilotCompileOptions = PilotCompileOptions {}
- runPilotCompile :: LogEnv -> Telemetry -> AmbientAws -> AppConfig -> PilotCompileOptions -> IO FilePath
- data PilotUploadUnconfigured = PilotUploadUnconfigured
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, while it concurrently runs the OSV export loop.
The probe server is raced against the export loop through
raceServerAgainstLoop (see there for the shutdown invariant):
the export loop never returns (it idles with no bucket, or supervises every fault as
transient with one), so the server's graceful return on shutdown must cancel it -- a
cancelled export cycle resumes from the remote artifact on the next boot.
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
| |
Instances
| Show PilotCompileOptions Source # | |
Defined in Ecluse.Pilot Methods showsPrec :: Int -> PilotCompileOptions -> ShowS # show :: PilotCompileOptions -> String # showList :: [PilotCompileOptions] -> ShowS # | |
| Eq PilotCompileOptions Source # | |
Defined in Ecluse.Pilot Methods (==) :: PilotCompileOptions -> PilotCompileOptions -> Bool # (/=) :: PilotCompileOptions -> PilotCompileOptions -> Bool # | |
runPilotCompile :: LogEnv -> Telemetry -> AmbientAws -> 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.
Constructors
| PilotUploadUnconfigured |
Instances
| Exception PilotUploadUnconfigured Source # | |
Defined in Ecluse.Pilot | |
| Show PilotUploadUnconfigured Source # | |
Defined in Ecluse.Pilot Methods showsPrec :: Int -> PilotUploadUnconfigured -> ShowS # show :: PilotUploadUnconfigured -> String # showList :: [PilotUploadUnconfigured] -> ShowS # | |
| Eq PilotUploadUnconfigured Source # | |
Defined in Ecluse.Pilot Methods (==) :: PilotUploadUnconfigured -> PilotUploadUnconfigured -> Bool # (/=) :: PilotUploadUnconfigured -> PilotUploadUnconfigured -> Bool # | |