#![deny(warnings)]
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![deny(unreachable_pub)]
#![deny(unused_allocation)]
#![deny(unused_extern_crates)]
#![deny(unused_assignments)]
#![deny(unused_comparisons)]
#![allow(clippy::cast_possible_wrap)]
#![allow(clippy::cast_sign_loss)]
#![allow(clippy::default_trait_access)] #![allow(clippy::float_cmp)]
#![allow(clippy::match_wildcard_for_single_variants)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::must_use_candidate)] #![allow(clippy::non_ascii_literal)] #![allow(clippy::unnested_or_patterns)] #![allow(clippy::type_complexity)] pub mod config;
pub mod event;
pub mod fanout;
pub mod ipallowlist;
pub mod metrics;
pub mod partition;
pub mod schema;
pub mod serde;
pub mod sink;
pub mod source;
pub mod tcp;
#[cfg(test)]
mod test_util;
pub mod time;
pub mod tls;
pub mod transform;
#[cfg(feature = "vrl")]
pub mod vrl;
use float_eq::FloatEq;
use std::path::PathBuf;
#[cfg(feature = "vrl")]
pub use crate::vrl::compile_vrl;
pub use event::EstimatedJsonEncodedSizeOf;
#[macro_use]
extern crate tracing;
pub fn default_data_dir() -> Option<PathBuf> {
Some(PathBuf::from("/var/lib/vector/"))
}
pub(crate) use vector_common::{Error, Result};
pub(crate) fn float_eq(l_value: f64, r_value: f64) -> bool {
(l_value.is_nan() && r_value.is_nan()) || l_value.eq_ulps(&r_value, &1)
}
#[cfg(feature = "test")]
#[macro_export]
macro_rules! emit {
($event:expr) => {
vector_lib::internal_event::emit(vector_lib::internal_event::DefaultName {
event: $event,
name: stringify!($event),
})
};
}
#[cfg(not(feature = "test"))]
#[macro_export]
macro_rules! emit {
($event:expr) => {
vector_lib::internal_event::emit($event)
};
}
#[cfg(feature = "test")]
#[macro_export]
macro_rules! register {
($event:expr) => {
vector_lib::internal_event::register(vector_lib::internal_event::DefaultName {
event: $event,
name: stringify!($event),
})
};
}
#[cfg(not(feature = "test"))]
#[macro_export]
macro_rules! register {
($event:expr) => {
vector_lib::internal_event::register($event)
};
}