Files
mytheclipse/crates/mytheclipse-storage
asepharyana 8106f8943e feat: add 4 new crates (queue, tracing, http, cli) + enhancements to existing crates
New crates:
- mytheclipse-queue: unified job queue with WorkerPool, retry/backoff, DLQ
  Backends: in-memory (default), Redis, NATS, PostgreSQL
- mytheclipse-tracing: tracing subscriber layers with env filter + OTLP/Jaeger export
- mytheclipse-http: HTTP client/server with timeout + tracing, axum server
- mytheclipse-cli: CLI framework with clap derive, built-in subcommands

Enhancements to existing crates:
- mytheclipse-core: SemaphorePool, LeaderElection, HealthRegistry/HealthCheck
- mytheclipse-cache: AutoRefreshCache (bg refresh on miss), CacheMetrics
- mytheclipse-config: ConfigSchema for JSON Schema generation
- mytheclipse-storage: MultipartUploadDriver trait
- mytheclipse-crypto: PASETO v4.local token support

All features compile with --all-features; tests + clippy pass clean.
2026-08-29 16:05:02 +07:00
..

mytheclipse-storage

A unified storage & file system abstraction so file handling isn't locked to one physical location.

  • Local disk (default) — plain files under a root directory.
  • S3-compatible object storage (s3) — Amazon S3, and any S3-compatible endpoint (MinIO included) via a custom endpoint URL.
  • Google Cloud Storage (gcs).

All operations are stream-based, so uploading/downloading a huge object never requires holding it entirely in memory.

Usage

use mytheclipse_storage::{LocalFileStorage, StorageDriver, bytes_stream, read_to_vec};

let storage = LocalFileStorage::new("/var/data");
storage.put("uploads/report.csv", bytes_stream(data)).await?;
let bytes = read_to_vec(storage.get("uploads/report.csv").await?).await?;

Swap LocalFileStorage::new(path) for S3Storage::connect("bucket").await? or GcsStorage::connect("bucket").await? to move to a distributed backend without touching call sites.