(server) chore: Rearrange server structure (#33)
This commit is contained in:
19
Server/src/services/general_service.rs
Normal file
19
Server/src/services/general_service.rs
Normal 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(),
|
||||
}))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user