Added service redistry,

This commit is contained in:
2025-04-03 08:24:08 -04:00
parent 311a3293cd
commit 29f0062cac
3 changed files with 52 additions and 6 deletions

View File

@ -1,4 +1,7 @@
use crate::{queue::{Message, MsgType}, utils::GenID};
use crate::{
queue::{Message, MsgType},
utils::GenID,
};
use std::{
collections::HashMap,
sync::{
@ -181,7 +184,7 @@ mod clientlinks {
let rx_client = link.send(req);
let msg = rx.recv_timeout(TIMEOUT).unwrap();
match msg.get_class() {
MsgType::ClientRequest => {},
MsgType::ClientRequest => {}
_ => unreachable!("should have been a client request"),
}
match msg.get_data().get("tx_id") {
@ -189,7 +192,7 @@ mod clientlinks {
let id = result.to_uuid().unwrap();
registry.send(&id, Reply {});
rx_client.recv().unwrap();
},
}
None => unreachable!("should have had a seender id"),
}
}
@ -204,7 +207,7 @@ impl Client {
fn new(rx: Receiver<Message>) -> Self {
Self {
registry: ClientRegistry::new(),
rx: rx
rx: rx,
}
}