execute basically working, still need to clear the response channel upon completion

This commit is contained in:
mbecker20
2025-09-17 01:57:00 -07:00
parent f6243fe6b1
commit 991c95fff0
18 changed files with 340 additions and 319 deletions

View File

@@ -81,6 +81,11 @@ impl<K: PartialEq + Eq + Hash + std::fmt::Debug + Clone, T: Clone>
self.cache.read().await.get(key).cloned()
}
pub async fn get_keys(&self) -> Vec<K> {
let cache = self.cache.read().await;
cache.keys().cloned().collect()
}
pub async fn get_values(&self) -> Vec<T> {
let cache = self.cache.read().await;
cache.values().cloned().collect()

View File

@@ -66,11 +66,11 @@ pub fn data_from_transport_bytes(
/// incoming transport bytes.
pub fn from_transport_bytes(
bytes: Bytes,
) -> anyhow::Result<(Uuid, MessageState, Bytes)> {
) -> anyhow::Result<(Bytes, Uuid, MessageState)> {
let (id, state) = id_state_from_transport_bytes(&bytes)?;
let mut res: Vec<u8> = bytes.into();
res.drain((res.len() - 17)..);
Ok((id, state, res.into()))
Ok((res.into(), id, state))
}
impl MessageState {