Gossip service implementation for cluster node autodiscovery with failure detection

This commit is contained in:
mdecimus
2024-05-10 20:34:08 +02:00
parent cf6765b70d
commit f4e5a0baf5
24 changed files with 1257 additions and 56 deletions

View File

@@ -159,25 +159,27 @@ impl TestServer {
let jmap_manager = JmapSessionManager::new(jmap);
config.assert_no_errors();
servers.spawn(|server, acceptor, shutdown_rx| {
match &server.protocol {
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
smtp_manager.clone(),
instance.core.clone(),
acceptor,
shutdown_rx,
),
ServerProtocol::Http => server.spawn(
jmap_manager.clone(),
instance.core.clone(),
acceptor,
shutdown_rx,
),
ServerProtocol::Imap | ServerProtocol::ManageSieve => {
unreachable!()
}
};
})
servers
.spawn(|server, acceptor, shutdown_rx| {
match &server.protocol {
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
smtp_manager.clone(),
instance.core.clone(),
acceptor,
shutdown_rx,
),
ServerProtocol::Http => server.spawn(
jmap_manager.clone(),
instance.core.clone(),
acceptor,
shutdown_rx,
),
ServerProtocol::Imap | ServerProtocol::ManageSieve => {
unreachable!()
}
};
})
.0
}
pub fn new_session(&self) -> Session<DummyIo> {