MCPcopy Create free account
hub / github.com/DefGuard/gateway / run_setup

Function run_setup

src/setup.rs:145–152  ·  view source on GitHub ↗
(
    config: &Config,
    logs_rx: Arc<tokio::sync::Mutex<mpsc::Receiver<LogEntry>>>,
)

Source from the content-addressed store, hash-verified

143}
144
145pub async fn run_setup(
146 config: &Config,
147 logs_rx: Arc<tokio::sync::Mutex<mpsc::Receiver<LogEntry>>>,
148) -> Result<TlsConfig, GatewayError> {
149 let setup_server = GatewaySetupServer::new(logs_rx, config.cert_dir.clone());
150 let tls_config = setup_server.await_setup(config).await?;
151 Ok(tls_config)
152}
153
154pub struct GatewaySetupServer {
155 key_pair: Arc<Mutex<Option<defguard_certs::RcGenKeyPair>>>,

Callers 1

mainFunction · 0.85

Calls 2

cloneMethod · 0.80
await_setupMethod · 0.80

Tested by

no test coverage detected