1use lab_resource_manager::{
12    JsonFileIdentityLinkRepository, MockUsageRepository, NotificationRouter,
13    NotifyResourceUsageChangesUseCase, load_config,
14};
15use std::sync::Arc;
16
17#[tokio::main]
18async fn main() -> Result<(), Box<dyn std::error::Error>> {
19    println!("š Starting resource usage watcher (mock example)");
20    println!("This example uses mock implementations - no credentials required!\n");
21
22    let config = load_config("config/resources.toml")?;
24
25    let identity_repo = Arc::new(JsonFileIdentityLinkRepository::new(
27        "data/identity_links.json".into(),
28    ));
29
30    let repository = MockUsageRepository::new();
32    let notifier = NotificationRouter::new(config, identity_repo);
33
34    println!("ā
 Mock repository and notification router initialized");
35
36    let usecase = NotifyResourceUsageChangesUseCase::new(repository, notifier).await?;
38
39    println!("š Polling for changes...\n");
41    usecase.poll_once().await?;
42
43    println!("\nā
 Example completed successfully!");
44    println!("š” Note: Mock repository returns empty results by default.");
45    println!(
46        "   To see actual notifications, configure mock notifications in config/resources.toml"
47    );
48
49    Ok(())
50}