-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add max concurrency, some refactoring
- Loading branch information
1 parent
e2cb81f
commit 66c5db5
Showing
6 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use std::sync::Arc; | ||
use std::sync::{Arc, OnceLock}; | ||
|
||
use anyhow::{anyhow, Context, Error}; | ||
use axum::Router; | ||
|
@@ -18,7 +18,14 @@ use crate::{ | |
pub const SERVICE_NAME: &str = "ic_gateway"; | ||
pub const AUTHOR_NAME: &str = "Boundary Node Team <[email protected]>"; | ||
|
||
// Store env/hostname in statics so that we don't have to clone them | ||
pub static ENV: OnceLock<String> = OnceLock::new(); | ||
pub static HOSTNAME: OnceLock<String> = OnceLock::new(); | ||
|
||
pub async fn main(cli: &Cli) -> Result<(), Error> { | ||
ENV.set(cli.misc.env.clone()).unwrap(); | ||
HOSTNAME.set(cli.misc.hostname.clone()).unwrap(); | ||
|
||
// Make a list of all supported domains | ||
let mut domains = cli.domain.domain.clone(); | ||
domains.extend_from_slice(&cli.domain.domain_system); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters