logstash_rs/
lib.rs

1pub mod buffer;
2pub mod error;
3pub mod event;
4pub mod output;
5pub use buffer::BufferedSender;
6pub use error::Error;
7pub use event::LogStashRecord;
8pub use output::tcp::TcpSender;
9
10pub type Result<T> = core::result::Result<T, Error>;
11
12pub trait Sender: Sync + Send + 'static {
13    fn send(&self, event: LogStashRecord) -> Result<()>;
14    fn send_batch(&self, events: Vec<LogStashRecord>) -> Result<()>;
15    fn flush(&self) -> Result<()>;
16}
17
18mod prelude {
19    pub use super::*;
20}