pub struct StreamIngester { /* private fields */ }Expand description
채널 기반 스트리밍 수집 파이프라인
백그라운드 스레드가 채널에서 StreamEvent 배치를 수신하여
batch_size 또는 max_latency 조건 충족 시 DBX에 일괄 반영합니다.
Implementations§
Source§impl StreamIngester
impl StreamIngester
Sourcepub fn new(
db: Arc<Database>,
table: &str,
batch_size: usize,
max_latency: Duration,
) -> Self
pub fn new( db: Arc<Database>, table: &str, batch_size: usize, max_latency: Duration, ) -> Self
스트림 인제스터 생성
§인수
db- 대상 데이터베이스 (Arc 공유)table- 이벤트를 적용할 테이블 이름batch_size- 이 이벤트 수에 도달하면 즉시 flushmax_latency- 버퍼가 차지 않아도 이 시간마다 강제 flush
Sourcepub fn sender(&self) -> SyncSender<Vec<StreamEvent>>
pub fn sender(&self) -> SyncSender<Vec<StreamEvent>>
이벤트 배치 송신용 sender 클론 반환
여러 스레드에서 동시에 이벤트를 전송할 수 있습니다.
Auto Trait Implementations§
impl Freeze for StreamIngester
impl !RefUnwindSafe for StreamIngester
impl Send for StreamIngester
impl Sync for StreamIngester
impl Unpin for StreamIngester
impl UnsafeUnpin for StreamIngester
impl !UnwindSafe for StreamIngester
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more