Files
mytheclipse/crates/corex-storage/Cargo.toml
T
asepharyana d119821339 feat: add panic tracking and logging with PanicTracker
- Implemented PanicTracker to log panics using tracing within a dedicated span.
- Introduced PanicInfo struct to capture panic details.
- Added tests for panic catching and hook restoration.

feat: implement token-bucket rate limiter

- Created RateLimiter to manage token consumption with configurable rates and burst capacity.
- Added methods for acquiring tokens and checking available tokens.
- Included tests for rate limiting behavior and token availability.

feat: add automatic retry with exponential backoff

- Developed retry function to handle transient errors with configurable retry strategies.
- Introduced RetryConfig for customizing retry behavior and jitter.
- Added tests for various retry scenarios and error handling.

feat: implement graceful shutdown coordination

- Created ShutdownManager to manage shutdown signals and task completion.
- Introduced ShutdownSignal for tasks to observe shutdown requests.
- Added tests for shutdown request handling and task draining.

feat: add timeout functionality for async operations

- Implemented with_timeout function to enforce execution time limits on futures.
- Created Timeout struct for wrapping futures with a deadline.
- Added tests for timeout behavior and error mapping.
2026-08-28 21:46:18 +07:00

45 lines
1.6 KiB
TOML

[package]
name = "corex-storage"
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
license = "MIT OR Apache-2.0"
repository = "https://github.com/asepharyana/mytheclipse"
homepage = "https://github.com/asepharyana/mytheclipse"
documentation = "https://docs.rs/corex-storage"
authors = ["asepharyana <superaseph@gmail.com>"]
description = "Unified storage & file system abstraction: one driver interface over Local Disk, S3/MinIO, and Google Cloud Storage, with stream-based upload/download."
readme = "README.md"
keywords = ["storage", "s3", "gcs", "minio", "filesystem"]
categories = ["filesystem", "asynchronous"]
[features]
default = ["local"]
# The core `StorageDriver` trait (always compiled) needs `tokio`'s io-util for
# `AsyncRead`/`ReadBuf`; `local` additionally needs `fs`/`rt`.
local = ["tokio/fs", "tokio/rt"]
# S3-compatible object storage (also covers MinIO via a custom endpoint).
s3 = ["dep:aws-sdk-s3", "dep:aws-config", "dep:aws-credential-types"]
# Google Cloud Storage.
gcs = ["dep:google-cloud-storage", "dep:google-cloud-auth"]
[dependencies]
tracing = "0.1"
# Required unconditionally: the core `StorageDriver` trait uses both.
async-trait = "0.1"
tokio = { version = "1.53", features = ["io-util"] }
bytes = "1"
# S3 / MinIO
aws-sdk-s3 = { version = "1", optional = true }
aws-config = { version = "1", optional = true, features = ["behavior-version-latest"] }
aws-credential-types = { version = "1", optional = true }
# Google Cloud Storage
google-cloud-storage = { version = "0.24", optional = true }
google-cloud-auth = { version = "0.17", optional = true }
[dev-dependencies]
tokio = { version = "1.53", features = ["full"] }
tempfile = "3"