(server) chore: Rearrange server structure (#33)

This commit is contained in:
2025-07-14 17:53:26 +08:00
parent e35236b8ef
commit 0c86730384
7 changed files with 87 additions and 94 deletions

View File

@ -0,0 +1,19 @@
use tonic::{Request, Response, Status};
use crate::protocol::general_service_server::GeneralService;
use crate::protocol::{Empty, ServerInfo};
pub(crate) struct GeneralServiceImpl;
#[tonic::async_trait]
impl GeneralService for GeneralServiceImpl {
async fn get_server_info(
&self,
_request: Request<Empty>,
) -> Result<Response<ServerInfo>, Status> {
Ok(Response::new(ServerInfo {
lang: "Rust".into(),
ver: "0.1.0".into(),
}))
}
}