summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-24 16:41:03 -0600
committermo khan <mo@mokhan.ca>2025-06-24 16:41:03 -0600
commitd4e3bb8f30c4b9edeb392881bd7b4a6baf79d415 (patch)
tree442976b24367cffd0563ed13929a72b6a96c8c1d /src/main.rs
parent85490a4cfa7f3836d3d2f1e7cbfe48b668aa484b (diff)
refactor: copy duplicate test helper method
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 6 insertions, 7 deletions
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<dyn std::error::Error>> {
+ 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))