| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Pilot.Export
Description
The S3 upload adapter for the compiled OSV artifact.
The amazonka-facing half of Pilot's export: PutObject a compiled osv.db into the
configured bucket over an S3 env built for an optional custom endpoint
(buildS3Env). It takes a pre-parsed endpoint tuple rather
than the application config, so it is an ecosystem-agnostic cloud adapter with no
dependency on the composition shell; the Pilot export loop resolves the endpoint from
config and passes it down.
Synopsis
- exportToS3 :: (MonadResource m, MonadUnliftIO m, MonadThrow m, KatipContext m) => Maybe TracerProvider -> Maybe (Bool, Text, Int) -> Text -> FilePath -> m ()
Documentation
exportToS3 :: (MonadResource m, MonadUnliftIO m, MonadThrow m, KatipContext m) => Maybe TracerProvider -> Maybe (Bool, Text, Int) -> Text -> FilePath -> m () Source #
Upload a compiled OSV artifact to the given S3 bucket, dialling an optional
custom endpoint (the pre-parsed (secure, host, port) resolved from configuration).
The PutObject runs inside an ecluse.pilot.osv.upload client span (inert when
telemetry is off) carrying the bucket, object key, and byte count. A failed upload is
logged at the call site and marks the span errored before it propagates to the export
loop's supervisor, which otherwise sees only an opaque restart.