add bench docker
This commit is contained in:
parent
c0af62b6cd
commit
7172f932ca
8 changed files with 78 additions and 8 deletions
|
|
@ -38,8 +38,13 @@ pub fn parse_opts(globals: &mut Globals, backends: &mut HashMap<String, Backend>
|
|||
},
|
||||
anyhow!("Wrong port spec.")
|
||||
);
|
||||
globals.listen_sockets = LISTEN_ADDRESSES
|
||||
.to_vec()
|
||||
let mut listen_addresses: Vec<&str> = LISTEN_ADDRESSES_V4.to_vec();
|
||||
if let Some(v) = config.listen_ipv6 {
|
||||
if v {
|
||||
listen_addresses.extend(LISTEN_ADDRESSES_V6.iter());
|
||||
}
|
||||
}
|
||||
globals.listen_sockets = listen_addresses
|
||||
.iter()
|
||||
.flat_map(|x| {
|
||||
let mut v: Vec<SocketAddr> = vec![];
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use std::{collections::HashMap, fs};
|
|||
pub struct ConfigToml {
|
||||
pub listen_port: Option<u16>,
|
||||
pub listen_port_tls: Option<u16>,
|
||||
pub listen_ipv6: Option<bool>,
|
||||
pub max_concurrent_streams: Option<u32>,
|
||||
pub max_clients: Option<u32>,
|
||||
pub apps: Option<Apps>,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
pub const LISTEN_ADDRESSES: &[&str] = &["0.0.0.0", "[::]"];
|
||||
pub const LISTEN_ADDRESSES_V4: &[&str] = &["0.0.0.0"];
|
||||
pub const LISTEN_ADDRESSES_V6: &[&str] = &["[::]"];
|
||||
// pub const HTTP_LISTEN_PORT: u16 = 8080;
|
||||
// pub const HTTPS_LISTEN_PORT: u16 = 8443;
|
||||
pub const TIMEOUT_SEC: u64 = 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue