remote_kvraft.rs 349 B

12345678910111213
  1. use async_trait::async_trait;
  2. use crate::common::{GetArgs, GetReply, PutAppendArgs, PutAppendReply};
  3. #[async_trait]
  4. pub trait RemoteKvraft: Send + Sync + 'static {
  5. async fn get(&self, args: GetArgs) -> std::io::Result<GetReply>;
  6. async fn put_append(
  7. &self,
  8. args: PutAppendArgs,
  9. ) -> std::io::Result<PutAppendReply>;
  10. }