mirror of
https://github.com/exchanges-lab/tradesync.git
synced 2026-08-05 05:06:07 +08:00
feat: initialize project structure, modules and configurations
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
use anyhow::Result;
|
||||
use nosync::{ModuleA, ModuleB};
|
||||
use tracing::info;
|
||||
use tracing_subscriber::{EnvFilter, FmtSubscriber};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
// Configure simple standard output logging
|
||||
let subscriber = FmtSubscriber::builder()
|
||||
.with_env_filter(EnvFilter::new("info"))
|
||||
.finish();
|
||||
tracing::subscriber::set_global_default(subscriber)
|
||||
.map_err(|e| anyhow::anyhow!("failed to set global tracing subscriber: {e}"))?;
|
||||
|
||||
info!("--- Running nosync library example ---");
|
||||
|
||||
// Construct the structs and execute the logic
|
||||
let processor = ModuleA::new("example-processor".to_string())?;
|
||||
let orchestrator = ModuleB::new(processor)?;
|
||||
|
||||
orchestrator.run().await?;
|
||||
|
||||
info!("--- Example execution completed successfully ---");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user