some refactor

This commit is contained in:
Jun Kurihara 2022-07-09 23:57:08 +09:00
commit 9335fc702e
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 146 additions and 88 deletions

View file

@ -16,7 +16,7 @@ use crate::{
error::*,
globals::*,
log::*,
proxy::{Backend, Backends, Proxy},
proxy::{Backend, Backends, Proxy, ServerNameLC},
};
use futures::future::select_all;
use hyper::Client;
@ -64,8 +64,8 @@ fn main() {
};
let mut backends = Backends {
default_app: None,
apps: HashMap::<String, Backend>::default(),
default_server_name: None,
apps: HashMap::<ServerNameLC, Backend>::default(),
};
parse_opts(&mut globals, &mut backends).expect("Invalid configuration");