Skip to content

s3 — object-storage backing

github.com/go-volumes/s3 is a pure-Go (CGO_ENABLED=0), from-scratch S3-backed block store that satisfies pool's Backing interface. It maps a flat byte address space onto fixed-size chunk objects in any S3-compatible bucket, with an in-memory write-back cache — so a copy-on-write pool (or any block consumer) runs on object storage with no local file.

Standard library only. No aws-sdk-go, no minio-go. AWS Signature Version 4 is implemented from scratch on crypto/hmac + crypto/sha256.

Packages

Package Purpose
sigv4 AWS Signature Version 4 signer — canonical request → string-to-sign → kDate→kRegion→kService→kSigning chain → Authorization. Validated byte-for-byte against the official AWS Signature Version 4 Test Suite.
client Minimal S3 client over net/http: Get / GetRange / Put / Delete / Head, path-style + virtual-host addressing, XML error parsing, 404 → ErrNotFound, injectable HTTP doer, context cancellation.
s3 (root) Store implementing pool.Backing (ReadAt, WriteAt, Truncate, Sync, Close) over fixed-size chunk objects + a write-back cache + a persisted metadata object.

Point a pool at a Store and the whole copy-on-write volume layer lives in a bucket.