mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
Merge pull request #86 from greatest-ape/more-compact-peers
Reduce ValidUntil size; reduce size of various ws structs; improve aquatic_http_protocol
This commit is contained in:
commit
c0ed0eb7db
24 changed files with 376 additions and 214 deletions
|
|
@ -8,7 +8,7 @@ use anyhow::Context;
|
|||
use aquatic_common::cpu_pinning::glommio::{get_worker_placement, set_affinity_for_util_worker};
|
||||
use aquatic_common::cpu_pinning::WorkerIndex;
|
||||
use aquatic_common::rustls_config::create_rustls_config;
|
||||
use aquatic_common::PanicSentinelWatcher;
|
||||
use aquatic_common::{PanicSentinelWatcher, ServerStartInstant};
|
||||
use glommio::{channels::channel_mesh::MeshBuilder, prelude::*};
|
||||
use signal_hook::{
|
||||
consts::{SIGTERM, SIGUSR1},
|
||||
|
|
@ -49,14 +49,19 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers);
|
||||
|
||||
let opt_tls_config = if config.network.enable_tls {
|
||||
Some(Arc::new(create_rustls_config(
|
||||
&config.network.tls_certificate_path,
|
||||
&config.network.tls_private_key_path,
|
||||
).with_context(|| "create rustls config")?))
|
||||
Some(Arc::new(
|
||||
create_rustls_config(
|
||||
&config.network.tls_certificate_path,
|
||||
&config.network.tls_private_key_path,
|
||||
)
|
||||
.with_context(|| "create rustls config")?,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let server_start_instant = ServerStartInstant::new();
|
||||
|
||||
let mut executors = Vec::new();
|
||||
|
||||
for i in 0..(config.socket_workers) {
|
||||
|
|
@ -88,6 +93,7 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
request_mesh_builder,
|
||||
response_mesh_builder,
|
||||
priv_dropper,
|
||||
server_start_instant,
|
||||
)
|
||||
.await
|
||||
})
|
||||
|
|
@ -123,6 +129,7 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
control_mesh_builder,
|
||||
request_mesh_builder,
|
||||
response_mesh_builder,
|
||||
server_start_instant,
|
||||
)
|
||||
.await
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue