feat: add corex-storage crate for unified storage abstraction
- Introduced corex-storage crate with support for local disk, S3-compatible, and Google Cloud Storage backends. - Implemented StorageDriver trait for various storage backends. - Added LocalFileStorage for local disk operations. - Added S3Storage for S3-compatible object storage with multipart upload support. - Added GcsStorage for Google Cloud Storage operations. - Included error handling for storage operations. - Added tests for each storage backend to ensure functionality. - Created README.md for documentation and usage examples. - Added Apache and MIT licenses for open-source compliance.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
[package]
|
||||
name = "corex-event"
|
||||
version = "1.2.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-event"
|
||||
authors = ["asepharyana <superaseph@gmail.com>"]
|
||||
description = "Unified events & message bus abstraction: in-memory pub/sub dispatcher plus pluggable distributed broker backends (RabbitMQ, NATS)."
|
||||
readme = "README.md"
|
||||
keywords = ["events", "pubsub", "message-bus", "rabbitmq", "nats"]
|
||||
categories = ["asynchronous", "network-programming"]
|
||||
|
||||
[features]
|
||||
default = ["mem"]
|
||||
# In-memory dispatcher (tokio broadcast channel), always cheap.
|
||||
mem = ["dep:tokio"]
|
||||
# Distributed broker backends.
|
||||
amqp = ["dep:lapin", "dep:futures-lite"]
|
||||
nats = ["dep:async-nats", "dep:futures-util", "dep:bytes"]
|
||||
|
||||
[dependencies]
|
||||
tracing = "0.1"
|
||||
# Required unconditionally: the core `EventBus`/`Subscription` traits (always
|
||||
# compiled) use it.
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1.53", features = ["sync", "rt"], optional = true }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
# RabbitMQ (pure Rust AMQP 0.9.1 client).
|
||||
lapin = { version = "2", optional = true }
|
||||
futures-lite = { version = "2", optional = true }
|
||||
|
||||
# NATS (pure Rust client).
|
||||
async-nats = { version = "0.38", optional = true }
|
||||
futures-util = { version = "0.3", optional = true }
|
||||
bytes = { version = "1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1.53", features = ["full"] }
|
||||
Reference in New Issue
Block a user