pub struct MultiConsumerTailerConfig {
pub directory: Utf8PathBuf,
pub pattern: String,
pub poll_watcher: Option<Duration>,
pub tail: bool,
pub consumers: Vec<ConsumerConfig>,
}Expand description
Configuration for a tailer that fans out records to multiple consumers.
Fields§
§directory: Utf8PathBufThe directory containing zstd-compressed JSONL log files.
pattern: StringGlob pattern for matching log filenames.
poll_watcher: Option<Duration>If set, use a polling-based filesystem watcher.
tail: boolIf true, ignore checkpoints and start from the most recent segment.
consumers: Vec<ConsumerConfig>The set of consumers that receive records.
Implementations§
Source§impl MultiConsumerTailerConfig
impl MultiConsumerTailerConfig
pub fn new(directory: Utf8PathBuf, consumers: Vec<ConsumerConfig>) -> Self
pub fn pattern(self, pattern: impl Into<String>) -> Self
pub fn poll_watcher(self, interval: Duration) -> Self
pub fn tail(self, enable: bool) -> Self
Sourcepub async fn build(self) -> Result<MultiConsumerTailer>
pub async fn build(self) -> Result<MultiConsumerTailer>
Build the multi-consumer tailer.
Auto Trait Implementations§
impl Freeze for MultiConsumerTailerConfig
impl !RefUnwindSafe for MultiConsumerTailerConfig
impl Send for MultiConsumerTailerConfig
impl !Sync for MultiConsumerTailerConfig
impl Unpin for MultiConsumerTailerConfig
impl !UnwindSafe for MultiConsumerTailerConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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