implement a local sync server

This commit is contained in:
Dustin J. Mitchell 2020-11-25 19:13:32 -05:00
parent 8f7e2e2790
commit 3537db9bbe
9 changed files with 249 additions and 72 deletions

View file

@ -51,7 +51,9 @@ impl CommandInvocation {
))
}
pub(super) fn get_server(&self) -> impl server::Server {
server::LocalServer::new()
pub(super) fn get_server(&self) -> Fallible<impl server::Server> {
Ok(server::LocalServer::new(Path::new(
"/tmp/task-sync-server",
))?)
}
}

View file

@ -22,7 +22,7 @@ define_subcommand! {
subcommand_invocation! {
fn run(&self, command: &CommandInvocation) -> Fallible<()> {
let mut replica = command.get_replica();
let mut server = command.get_server();
let mut server = command.get_server()?;
replica.sync(&mut server)?;
Ok(())
}