wip: started to implement reloader service

This commit is contained in:
Jun Kurihara 2024-05-27 11:55:22 +09:00
commit 377096c14e
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
4 changed files with 82 additions and 64 deletions

View file

@ -0,0 +1,15 @@
use rustc_hash::FxHashMap as HashMap;
use rustls::ServerConfig;
use std::sync::Arc;
/// ServerName in bytes type
pub type ServerNameBytes = Vec<u8>;
/// ServerName (SNI) to ServerConfig map type
pub type ServerNameCryptoMap = HashMap<ServerNameBytes, Arc<ServerConfig>>;
/// ServerName (SNI) to ServerConfig map
pub struct ServerCrypto {
// For Quic/HTTP3, only servers with no client authentication
pub inner_global_no_client_auth: Arc<ServerConfig>,
// // For TLS over TCP/HTTP2 and 1.1, map of SNI to server_crypto for all given servers
pub inner_local_map: Arc<ServerNameCryptoMap>,
}