- Package renamed from @push.rocks/smarts3 to @push.rocks/smartstorage - Class: Smarts3 → SmartStorage, Interface: ISmarts3Config → ISmartStorageConfig - Method: getS3Descriptor → getStorageDescriptor - Rust binary: rusts3 → ruststorage - Rust types: S3Error→StorageError, S3Action→StorageAction, S3Config→SmartStorageConfig, S3Server→StorageServer - On-disk file extension: ._S3_object → ._storage_object - Default credentials: S3RVER → STORAGE - All internal S3 branding removed; AWS S3 protocol compatibility fully maintained
47 lines
1.1 KiB
Rust
47 lines
1.1 KiB
Rust
mod action;
|
|
mod auth;
|
|
mod config;
|
|
mod management;
|
|
mod policy;
|
|
mod error;
|
|
mod server;
|
|
mod storage;
|
|
mod xml_response;
|
|
|
|
use clap::Parser;
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "ruststorage", about = "High-performance S3-compatible storage server")]
|
|
struct Cli {
|
|
/// Run in management mode (IPC via stdin/stdout)
|
|
#[arg(long)]
|
|
management: bool,
|
|
|
|
/// Log level
|
|
#[arg(long, default_value = "info")]
|
|
log_level: String,
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() -> anyhow::Result<()> {
|
|
let cli = Cli::parse();
|
|
|
|
if cli.management {
|
|
// Init tracing to stderr only (stdout reserved for IPC)
|
|
tracing_subscriber::fmt()
|
|
.with_writer(std::io::stderr)
|
|
.with_env_filter(
|
|
tracing_subscriber::EnvFilter::try_new(&cli.log_level)
|
|
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
|
|
)
|
|
.init();
|
|
|
|
management::management_loop().await?;
|
|
} else {
|
|
eprintln!("ruststorage: use --management flag for IPC mode");
|
|
std::process::exit(1);
|
|
}
|
|
|
|
Ok(())
|
|
}
|