summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
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))