pub mod fanout;
mod in_memory;
mod ndjson;
mod noop;
mod stdout;
pub(crate) mod writer;
use std::{future::Future, pin::Pin};
pub use self::{
fanout::FanOutSink,
in_memory::{InMemoryHandle, InMemorySink},
ndjson::NdjsonFileSink,
noop::NoopSink,
stdout::{FormatterStyle, StdoutSink},
writer::{
ErasedWriter, LevelSplitWriter, MakeWriter, NonBlockingHandle, NonBlockingWriter,
RollingFileHandle, RollingFileWriter, RollingFileWriterBuilder, RollingPolicy,
StderrWriter, StdoutWriter, TeeWriter, WorkerGuard,
},
};
use crate::registry::ScrubbedEnvelope;
pub type SinkFut<'a> = Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
pub trait Sink: Send + Sync + 'static {
fn deliver(&self, env: ScrubbedEnvelope<'_>);
fn flush(&self) -> SinkFut<'_> {
Box::pin(async {})
}
fn shutdown(&self) -> SinkFut<'_> {
Box::pin(async {})
}
}