-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/tracing
- Loading branch information
Showing
7 changed files
with
230 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
use async_trait::async_trait; | ||
|
||
mod exchange; | ||
mod executor; | ||
pub mod node; | ||
pub mod p2p; | ||
pub mod store; | ||
pub mod syncer; | ||
mod utils; | ||
|
||
#[async_trait] | ||
pub trait Service: Send + Sync { | ||
type Args; | ||
type Command; | ||
type Error; | ||
|
||
async fn start(args: Self::Args) -> Result<Self, Self::Error> | ||
where | ||
Self: Sized; | ||
|
||
async fn stop(&self) -> Result<(), Self::Error>; | ||
|
||
async fn send_command(&self, cmd: Self::Command) -> Result<(), Self::Error>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.