- add: gRPC health check for gRPC services
This commit is contained in:
@@ -33,7 +33,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Register service with Consul
|
||||
let service_id = consul_registration::get_or_generate_service_id(env!("CARGO_PKG_NAME"));
|
||||
let version = env!("CARGO_PKG_VERSION").to_string();
|
||||
let tags = vec![version];
|
||||
let tags = vec![version, "grpc".to_string()];
|
||||
let mut meta = HashMap::new();
|
||||
meta.insert("name".to_string(), "Athena".to_string());
|
||||
consul_registration::register_service(
|
||||
@@ -44,7 +44,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
service_port.parse().unwrap_or(50054),
|
||||
tags,
|
||||
meta,
|
||||
&health_check_url,
|
||||
Some("http"),
|
||||
Some(&health_check_url),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user