#What it is
Trove is a multi-backend object storage engine for Go: one API across local disk, memory, S3, GCS, Azure Blob and SFTP, with middleware you stack on the read and write paths.
#What it does
- Composable middleware: stackable read/write interceptors for encryption, compression, virus scanning or watermarking, each with fine-grained scoping so a rule can apply to one bucket or one key pattern.
- Multi-backend routing: route objects to different backends by glob pattern or a custom function. Logs to cold storage, temp files to an ephemeral backend, everything else to the default.
- Streaming: chunked transfers with backpressure, resumability, pause/resume and lifecycle hooks.
- Content-addressable storage: deduplication by SHA-256, BLAKE3 or XXHash, with reference counting and garbage collection.
- Virtual filesystem: an io/fs.FS-compatible hierarchical view over flat object storage, so standard library code that walks directories works unchanged.
- Capability interfaces: multipart uploads, pre-signed URLs, versioning, server-side copy, range reads, lifecycle rules and change notifications are opt-in per driver, detected rather than assumed.
#The capability design
Not every backend can do everything. A local filesystem has no pre-signed URLs; SFTP has no server-side copy. Rather than a lowest common denominator or a runtime error, capabilities are separate interfaces you type-assert for, so calling code can degrade deliberately instead of discovering the gap in production.