From 594abe311e4dfbbcc477474561756bc5e5f0e539 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 18 Jun 2025 17:53:00 -0600 Subject: chore: add make target to list rpc services --- Makefile | 4 ++++ src/main.rs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62138427..14254543 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,7 @@ run-image: build-image .PHONY: health-check health-check: @grpcurl -plaintext localhost:50051 grpc.health.v1.Health/Check + +.PHONY: list-services +list-services: + @grpcurl -plaintext localhost:50051 list diff --git a/src/main.rs b/src/main.rs index 5af58aa0..05d57719 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ impl Authorization for PolicyServer { #[tokio::main] async fn main() -> Result<(), Box> { let addr = "[::1]:50051".parse()?; + let authorization_service = AuthorizationServer::new(PolicyServer::default()); let (health_reporter, health_service) = tonic_health::server::health_reporter(); health_reporter .set_serving::>() @@ -44,8 +45,8 @@ async fn main() -> Result<(), Box> { .build_v1() .unwrap(); Server::builder() + .add_service(authorization_service) .add_service(health_service) - .add_service(AuthorizationServer::new(PolicyServer::default())) .add_service(reflection_service) .serve(addr) .await?; -- cgit v1.2.3