-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
460 additions
and
44 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
Binary file not shown.
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 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,22 @@ | ||
use lazy_static::lazy_static; | ||
use tonic::{async_trait, Request, Response, Status}; | ||
|
||
use crate::proto::{self, VersionRequest, VersionResponse}; | ||
|
||
lazy_static! { | ||
static ref STEWARD_VERSION: &'static str = env!("CARGO_PKG_VERSION"); | ||
} | ||
|
||
pub struct StatusHandler; | ||
|
||
#[async_trait] | ||
impl proto::status_service_server::StatusService for StatusHandler { | ||
async fn version( | ||
&self, | ||
_: Request<VersionRequest>, | ||
) -> Result<Response<VersionResponse>, Status> { | ||
Ok(Response::new(VersionResponse { | ||
version: STEWARD_VERSION.to_string(), | ||
})) | ||
} | ||
} |
Oops, something went wrong.