drasi_source_sdk/
debug_publisher.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use axum::async_trait;

use crate::models::SourceChange;
use super::Publisher;

pub struct DebugPublisher {    
}

impl DebugPublisher {
    pub fn new() -> Self {
        DebugPublisher { }
    }
}

#[async_trait]
impl Publisher for DebugPublisher {
    async fn publish(&self, change: SourceChange) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
        log::info!("{:?}", serde_json::to_string(&change));
        Ok(())
    }
}