Skip to content

Commit

Permalink
feat: add SyncService
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra-yse committed Nov 28, 2024
1 parent 56f6264 commit 45a3143
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/core/src/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
use std::sync::Arc;

use anyhow::{anyhow, Result};

use crate::{persist::Persister, prelude::Signer};

use self::client::SyncerClient;
pub(crate) mod client;
pub(crate) mod model;

pub(crate) struct SyncService {
remote_url: String,
persister: Arc<Persister>,
signer: Arc<Box<dyn Signer>>,
client: Box<dyn SyncerClient>,
}

impl SyncService {
pub(crate) fn new(
remote_url: String,
persister: Arc<Persister>,
signer: Arc<Box<dyn Signer>>,
client: Box<dyn SyncerClient>,
) -> Self {
Self {
remote_url,
persister,
signer,
client,
}
}

}

0 comments on commit 45a3143

Please sign in to comment.