From d4e3bb8f30c4b9edeb392881bd7b4a6baf79d415 Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 24 Jun 2025 16:41:03 -0600 Subject: refactor: copy duplicate test helper method --- src/main.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8eb7b5ef..8fa32b33 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,18 +1,17 @@ -use envoy_types::ext_authz::v3::pb::AuthorizationServer; -use std::sync::Arc; -use tonic::transport::Server; - pub mod authorization; -use authorization::{CedarAuthorizer, CheckService}; #[tokio::main] async fn main() -> Result<(), Box> { + use envoy_types::ext_authz::v3::pb::AuthorizationServer; + use std::sync::Arc; + use tonic::transport::Server; + let addr = "[::1]:50051".parse()?; let (_health_reporter, health_service) = tonic_health::server::health_reporter(); - let authorizer = Arc::new(CedarAuthorizer::new()); - let check_service = CheckService::new(authorizer); + let authorizer = Arc::new(authorization::CedarAuthorizer::new()); + let check_service = authorization::CheckService::new(authorizer); Server::builder() .add_service(AuthorizationServer::new(check_service)) -- cgit v1.2.3