Skip to content

Commit

Permalink
chore(dev): Add wrapper for vector-buffers to vector-lib (vectord…
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceg authored Oct 27, 2023
1 parent 0a5e3db commit 2cef62c
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 0 additions & 1 deletion lib/vector-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions lib/vector-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions lib/vector-lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/api/tap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion src/config/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/elasticsearch/encoder.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion src/source_sender/errors.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion src/source_sender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/sources/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion src/test_util/mock/sources/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion src/test_util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/topology/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/topology/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion src/topology/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/topology/test/backpressure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/topology/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/topology/test/reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down

0 comments on commit 2cef62c

Please sign in to comment.