-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated administration service to metadataservice
- Loading branch information
dutchie032
committed
Sep 24, 2024
1 parent
e4b2791
commit eff3537
Showing
9 changed files
with
39 additions
and
43 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
10 changes: 5 additions & 5 deletions
10
...cs/administration/v0/administration.proto → protos/dcs/metadata/v0/metadata.proto
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use stubs::metadata::v0::metadata_service_server::MetadataService; | ||
use stubs::*; | ||
use tonic::async_trait; | ||
use tonic::{Request, Response, Status}; | ||
|
||
use super::MissionRpc; | ||
|
||
#[async_trait] | ||
impl MetadataService for MissionRpc { | ||
async fn get_health( | ||
&self, | ||
_request: Request<metadata::v0::GetHealthRequest>, | ||
) -> Result<Response<metadata::v0::GetHealthResponse>, Status> { | ||
let alive: bool = true; | ||
return Ok(Response::new(metadata::v0::GetHealthResponse { alive })); | ||
} | ||
|
||
async fn get_version( | ||
&self, | ||
_request: Request<metadata::v0::GetVersionRequest>, | ||
) -> Result<Response<metadata::v0::GetVersionResponse>, Status> { | ||
const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); | ||
let version = VERSION.unwrap_or("unknown").to_string(); | ||
return Ok(Response::new(metadata::v0::GetVersionResponse { version })); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod v0 { | ||
tonic::include_proto!("dcs.metadata.v0"); | ||
} |