diff --git a/Cargo.lock b/Cargo.lock index b68934270ced9..505eeaf3a86bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9873,7 +9873,6 @@ dependencies = [ "url", "uuid", "vector-api-client", - "vector-buffers", "vector-lib", "vector-lookup", "vector-vrl-functions", @@ -10121,6 +10120,7 @@ name = "vector-lib" version = "0.1.0" dependencies = [ "codecs", + "vector-buffers", "vector-common", "vector-config", "vector-core", diff --git a/Cargo.toml b/Cargo.toml index 9c094e95543b1..96589d328383b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -139,7 +139,6 @@ prometheus-parser = { path = "lib/prometheus-parser", optional = true } opentelemetry-proto = { path = "lib/opentelemetry-proto", optional = true } tracing-limit = { path = "lib/tracing-limit" } vector-api-client = { path = "lib/vector-api-client", optional = true } -vector-buffers = { path = "lib/vector-buffers", default-features = false } vector-lib = { path = "lib/vector-lib", default-features = false, features = ["vrl"] } vector-vrl-functions = { path = "lib/vector-vrl/functions" } loki-logproto = { path = "lib/loki-logproto", optional = true } diff --git a/lib/vector-core/src/lib.rs b/lib/vector-core/src/lib.rs index 399b270945110..70e2da523b374 100644 --- a/lib/vector-core/src/lib.rs +++ b/lib/vector-core/src/lib.rs @@ -51,7 +51,6 @@ use std::path::PathBuf; #[cfg(feature = "vrl")] pub use crate::vrl::compile_vrl; -pub use vector_buffers as buffers; #[cfg(any(test, feature = "test"))] pub use vector_common::event_test_util; pub use vector_common::{byte_size_of::ByteSizeOf, internal_event}; diff --git a/lib/vector-lib/Cargo.toml b/lib/vector-lib/Cargo.toml index 524bf2f7f00b6..9874802a9df60 100644 --- a/lib/vector-lib/Cargo.toml +++ b/lib/vector-lib/Cargo.toml @@ -7,6 +7,7 @@ publish = false [dependencies] codecs = { path = "../codecs", default-features = false } +vector-buffers = { path = "../vector-buffers", default-features = false } vector-common = { path = "../vector-common" } vector-config = { path = "../vector-config" } vector-core = { path = "../vector-core", default-features = false } diff --git a/lib/vector-lib/src/lib.rs b/lib/vector-lib/src/lib.rs index 6c59a84d1d756..f2ac241a2766e 100644 --- a/lib/vector-lib/src/lib.rs +++ b/lib/vector-lib/src/lib.rs @@ -1,4 +1,5 @@ pub use codecs; +pub use vector_buffers as buffers; pub use vector_common::{ assert_event_data_eq, btreemap, byte_size_of, byte_size_of::ByteSizeOf, conversion, encode_logfmt, finalization, finalizer, impl_event_data_eq, internal_event, json_size, @@ -11,9 +12,8 @@ pub use vector_core::compile_vrl; #[cfg(feature = "test")] pub use vector_core::event_test_util; pub use vector_core::{ - buckets, buffers, default_data_dir, event, fanout, metric_tags, metrics, partition, quantiles, - samples, schema, serde, sink, source, tcp, tls, transform, update_counter, - EstimatedJsonEncodedSizeOf, + buckets, default_data_dir, event, fanout, metric_tags, metrics, partition, quantiles, samples, + schema, serde, sink, source, tcp, tls, transform, update_counter, EstimatedJsonEncodedSizeOf, }; pub use vector_stream as stream; diff --git a/src/api/tap.rs b/src/api/tap.rs index 15ddfcf4406c0..c5f3948e6755d 100644 --- a/src/api/tap.rs +++ b/src/api/tap.rs @@ -10,7 +10,7 @@ use tokio::sync::{ oneshot, }; use uuid::Uuid; -use vector_buffers::{topology::builder::TopologyBuilder, WhenFull}; +use vector_lib::buffers::{topology::builder::TopologyBuilder, WhenFull}; use super::{ schema::events::{ diff --git a/src/config/sink.rs b/src/config/sink.rs index 83eee0315e09b..9289716cb3ce5 100644 --- a/src/config/sink.rs +++ b/src/config/sink.rs @@ -3,7 +3,7 @@ use std::cell::RefCell; use async_trait::async_trait; use dyn_clone::DynClone; use serde::Serialize; -use vector_buffers::{BufferConfig, BufferType}; +use vector_lib::buffers::{BufferConfig, BufferType}; use vector_lib::configurable::attributes::CustomAttribute; use vector_lib::configurable::schema::{SchemaGenerator, SchemaObject}; use vector_lib::configurable::{ diff --git a/src/sinks/elasticsearch/encoder.rs b/src/sinks/elasticsearch/encoder.rs index 3fec60ba1c1b8..22e517f7ac499 100644 --- a/src/sinks/elasticsearch/encoder.rs +++ b/src/sinks/elasticsearch/encoder.rs @@ -1,7 +1,7 @@ use std::{io, io::Write}; use serde::Serialize; -use vector_buffers::EventCount; +use vector_lib::buffers::EventCount; use vector_lib::{config::telemetry, event::Event, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::{ internal_event::TaggedEventsSent, diff --git a/src/sinks/prelude.rs b/src/sinks/prelude.rs index 3bee1b9f73fa1..1d197d7ccc80d 100644 --- a/src/sinks/prelude.rs +++ b/src/sinks/prelude.rs @@ -4,7 +4,7 @@ pub use async_trait::async_trait; pub use futures::{future, future::BoxFuture, stream::BoxStream, FutureExt, StreamExt}; pub use tower::{Service, ServiceBuilder}; -pub use vector_buffers::EventCount; +pub use vector_lib::buffers::EventCount; pub use vector_lib::configurable::configurable_component; pub use vector_lib::stream::{BatcherSettings, DriverResponse}; pub use vector_lib::{ diff --git a/src/source_sender/errors.rs b/src/source_sender/errors.rs index b0d9052c8747a..4e588c763516c 100644 --- a/src/source_sender/errors.rs +++ b/src/source_sender/errors.rs @@ -1,7 +1,7 @@ use std::fmt; use tokio::sync::mpsc; -use vector_buffers::topology::channel::SendError; +use vector_lib::buffers::topology::channel::SendError; use crate::event::{Event, EventArray}; diff --git a/src/source_sender/mod.rs b/src/source_sender/mod.rs index 59d6e0902315d..84a6b2362cc2f 100644 --- a/src/source_sender/mod.rs +++ b/src/source_sender/mod.rs @@ -6,7 +6,7 @@ use chrono::Utc; use futures::{Stream, StreamExt}; use metrics::{register_histogram, Histogram}; use tracing::Span; -use vector_buffers::topology::channel::{self, LimitedReceiver, LimitedSender}; +use vector_lib::buffers::topology::channel::{self, LimitedReceiver, LimitedSender}; #[cfg(test)] use vector_lib::event::{into_event_stream, EventStatus}; use vector_lib::internal_event::{ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/sources/kafka.rs b/src/sources/kafka.rs index 949890468f35c..a26b982c85b1b 100644 --- a/src/sources/kafka.rs +++ b/src/sources/kafka.rs @@ -1531,7 +1531,7 @@ mod integration_test { }; use stream_cancel::{Trigger, Tripwire}; use tokio::time::sleep; - use vector_buffers::topology::channel::BufferReceiver; + use vector_lib::buffers::topology::channel::BufferReceiver; use vector_lib::event::EventStatus; use vrl::{event_path, value}; diff --git a/src/test_util/mock/sources/basic.rs b/src/test_util/mock/sources/basic.rs index 59310030a08db..40ba4d7bbef94 100644 --- a/src/test_util/mock/sources/basic.rs +++ b/src/test_util/mock/sources/basic.rs @@ -4,7 +4,7 @@ use std::sync::{ }; use async_trait::async_trait; -use vector_buffers::topology::channel::{limited, LimitedReceiver}; +use vector_lib::buffers::topology::channel::{limited, LimitedReceiver}; use vector_lib::configurable::configurable_component; use vector_lib::{config::LogNamespace, schema::Definition}; use vector_lib::{ diff --git a/src/test_util/mod.rs b/src/test_util/mod.rs index a58ef0bcf5369..ff3cc3d5fbee8 100644 --- a/src/test_util/mod.rs +++ b/src/test_util/mod.rs @@ -34,7 +34,7 @@ use tokio_stream::wrappers::TcpListenerStream; #[cfg(unix)] use tokio_stream::wrappers::UnixListenerStream; use tokio_util::codec::{Encoder, FramedRead, FramedWrite, LinesCodec}; -use vector_buffers::topology::channel::LimitedReceiver; +use vector_lib::buffers::topology::channel::LimitedReceiver; use vector_lib::event::{BatchNotifier, Event, EventArray, LogEvent}; #[cfg(test)] use zstd::Decoder as ZstdDecoder; diff --git a/src/topology/mod.rs b/src/topology/mod.rs index 8d3b2c604f24f..f904c55fc88d4 100644 --- a/src/topology/mod.rs +++ b/src/topology/mod.rs @@ -27,7 +27,7 @@ use std::{ use futures::{Future, FutureExt}; use tokio::sync::{mpsc, watch}; -use vector_buffers::topology::channel::{BufferReceiverStream, BufferSender}; +use vector_lib::buffers::topology::channel::{BufferReceiverStream, BufferSender}; pub use self::builder::TopologyPieces; pub use self::controller::{ReloadOutcome, SharedTopologyController, TopologyController}; diff --git a/src/topology/running.rs b/src/topology/running.rs index aaee1a5eddbdf..16fe185a4f9d5 100644 --- a/src/topology/running.rs +++ b/src/topology/running.rs @@ -12,7 +12,7 @@ use tokio::{ time::{interval, sleep_until, Duration, Instant}, }; use tracing::Instrument; -use vector_buffers::topology::channel::BufferSender; +use vector_lib::buffers::topology::channel::BufferSender; use vector_lib::trigger::DisabledTrigger; use super::{ diff --git a/src/topology/task.rs b/src/topology/task.rs index 85175d236db00..afdbaf9da165b 100644 --- a/src/topology/task.rs +++ b/src/topology/task.rs @@ -9,7 +9,7 @@ use futures::{future::BoxFuture, FutureExt}; use pin_project::pin_project; use snafu::Snafu; use tokio::task::JoinError; -use vector_buffers::topology::channel::BufferReceiverStream; +use vector_lib::buffers::topology::channel::BufferReceiverStream; use vector_lib::event::EventArray; use crate::{config::ComponentKey, utilization::Utilization}; diff --git a/src/topology/test/backpressure.rs b/src/topology/test/backpressure.rs index 08d3043da4cd1..5da2950e2f72e 100644 --- a/src/topology/test/backpressure.rs +++ b/src/topology/test/backpressure.rs @@ -2,7 +2,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use tokio::time::Duration; -use vector_buffers::{BufferConfig, BufferType, WhenFull}; +use vector_lib::buffers::{BufferConfig, BufferType, WhenFull}; use vector_lib::config::MEMORY_BUFFER_DEFAULT_MAX_EVENTS; use crate::{config::Config, test_util, test_util::start_topology}; diff --git a/src/topology/test/mod.rs b/src/topology/test/mod.rs index 53c7b84e471e7..5e130b53954b1 100644 --- a/src/topology/test/mod.rs +++ b/src/topology/test/mod.rs @@ -26,7 +26,7 @@ use tokio::{ task::yield_now, time::{sleep, Duration}, }; -use vector_buffers::{BufferConfig, BufferType, WhenFull}; +use vector_lib::buffers::{BufferConfig, BufferType, WhenFull}; use vector_lib::config::ComponentKey; use vector_lib::config::OutputId; diff --git a/src/topology/test/reload.rs b/src/topology/test/reload.rs index 4c05a5d00a9b2..f96e30469f704 100644 --- a/src/topology/test/reload.rs +++ b/src/topology/test/reload.rs @@ -7,7 +7,7 @@ use std::{ use futures::StreamExt; use tokio::time::sleep; use tokio_stream::wrappers::UnboundedReceiverStream; -use vector_buffers::{BufferConfig, BufferType, WhenFull}; +use vector_lib::buffers::{BufferConfig, BufferType, WhenFull}; use vector_lib::config::ComponentKey; use crate::{