Expand description
Generic S3 ObjectSource for pomelo-data — reads objects from any
S3-compatible store (Cloudflare R2, AWS S3, MinIO, GCS-S3) over HTTPS with
SigV4-presigned GETs. Endpoint is configurable, so nothing here is
Cloudflare-specific; the container points it at R2, OSS users at anything.
pomelo-data stays pure (trait + LocalSource); cloud access lives here.
Structs§
- S3Conn
- Resolved S3/R2 connection details from the environment.
- S3Source
- An
ObjectSourcebacked by an S3-compatible bucket.
Enums§
- OutStore
- The destination for an
fmp-syncrun: a local path or an S3/R2 bucket. Both implementObjectSink/ObjectSource, sosync_intowrites a byte-identicaldata-layout.mdtree either way (the S3 variant prepends an optional key prefix from the URL path).
Functions§
- resolve_
s3_ conn - Resolve S3/R2 credentials + endpoint from the environment, trying the
S3_prefix first (Cloudflare R2 / static keys) thenAWS_(AWS S3, incl. IAM-role temporary credentials viaAWS_SESSION_TOKEN). Per prefixPit reads{P}ACCESS_KEY_ID,{P}SECRET_ACCESS_KEY, optional{P}SESSION_TOKEN,{P}ENDPOINT/{P}ENDPOINT_URL(AWS: derived from{P}REGIONif unset), and{P}REGION(defaultauto).getis injected so the chain is unit-testable. A different deployment prefix should be mapped ontoS3_*/AWS_*in the env.