feat: change uid check

- change uid checker due to limitation of header
- refactor codes

Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
Pakin 2026-04-28 16:43:22 +07:00
parent 819bd08bc3
commit da956d39a7
16 changed files with 1398 additions and 1451 deletions

View file

@ -1,4 +1,3 @@
use rayon::iter::Either;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
@ -62,6 +61,7 @@ pub struct StreamDataChunk<T> {
pub start_idx: usize,
/// Chunked data which splited into N items per chunk
pub data: Vec<T>,
uid: String,
}
impl<T> IntoStreamMessage for StreamDataChunk<T>
@ -86,11 +86,12 @@ impl<T> StreamDataChunk<T>
where
T: Serialize,
{
pub fn new(sid: &str, start_idx: usize, data: Vec<T>) -> Self {
pub fn new(sid: &str, start_idx: usize, data: Vec<T>, uid: String) -> Self {
Self {
stream_id: sid.to_string(),
start_idx,
data,
uid,
}
}