Tiny fix.

This commit is contained in:
Nicolas Patry 2025-04-30 17:50:14 +02:00
parent 3aa8564652
commit 338cdc2eb8
No known key found for this signature in database
GPG Key ID: 87B37D879D09DEB4
2 changed files with 6 additions and 5 deletions

View File

@ -9,16 +9,13 @@ async fn main() {
// List of backend servers
let backends = vec![
"http://localhost:8000".to_string(),
// "http://localhost:8001".to_string(),
"http://localhost:8001".to_string(),
// "http://localhost:8002".to_string(),
// "http://localhost:8003".to_string(),
];
// Create a new instance of the RoundRobinRouter
println!("Using Content aware");
// Create the Axum router
let (sx, rx) = tokio::sync::mpsc::channel(100);
let communicator = Communicator::new(sx);
tokio::task::spawn(async move {
@ -28,6 +25,9 @@ async fn main() {
let mut router = OverloadHandler::new(lb, backends, rx);
router.run().await;
} else {
println!("Using Content aware");
// Create the Axum router
let lb = ContentAware::new();
let mut router = OverloadHandler::new(lb, backends, rx);
router.run().await;

View File

@ -124,6 +124,7 @@ impl Node {
}
#[cfg(debug_assertions)]
#[allow(dead_code)]
fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
// TODO reclaim the nodes too.
let mismatch = mismatch(data, &self.content);
@ -155,7 +156,7 @@ impl Trie {
self.root.insert(data)
}
// TODO
#[cfg(debug_assertions)]
#[allow(dead_code)]
pub fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
self.root.remove(data)