diff --git a/Cargo.lock b/Cargo.lock index 48e44c2fd150a..b3fe498a51624 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9866,9 +9866,6 @@ dependencies = [ "uuid", "vector-api-client", "vector-buffers", - "vector-config", - "vector-config-common", - "vector-config-macros", "vector-lib", "vector-lookup", "vector-stream", @@ -10117,6 +10114,7 @@ name = "vector-lib" version = "0.1.0" dependencies = [ "vector-common", + "vector-config", "vector-core", ] diff --git a/Cargo.toml b/Cargo.toml index 7dddc4e4b4ba6..9ca6ef0b2d279 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -141,9 +141,6 @@ 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-config = { path = "lib/vector-config" } -vector-config-common = { path = "lib/vector-config-common" } -vector-config-macros = { path = "lib/vector-config-macros" } vector-lib = { path = "lib/vector-lib", default-features = false, features = ["vrl"] } vector-stream = { path = "lib/vector-stream" } vector-vrl-functions = { path = "lib/vector-vrl/functions" } diff --git a/lib/vector-config-common/src/lib.rs b/lib/vector-config-common/src/lib.rs index f7305a3abea50..297e9aa7ace72 100644 --- a/lib/vector-config-common/src/lib.rs +++ b/lib/vector-config-common/src/lib.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + // TODO: `darling` is currently strict about accepting only matching literal types for scalar fields i.e. a `f64` field // can only be parsed from a string or float literal, but not an integer literal... and float literals have to be in the // form of `1000.0`, not `1000`. @@ -10,10 +12,35 @@ // `#[configurable(validation(length(min = 1)))]` to indicate the string cannot be empty, when // something like `#[configurable(validation(not_empty)]` is a bit more self-evident, and shorter to boot -#![deny(warnings)] +use std::sync::OnceLock; + pub mod attributes; pub mod constants; pub mod human_friendly; pub mod num; pub mod schema; pub mod validation; + +/// Generate the package name to reach `vector_config` in the output of the macros. This should be +/// `vector_lib::configurable` in all packages that can import `vector_lib` to allow for a single +/// import interface, but it needs to explicitly name `vector_config` in all packages that +/// themselves import `vector_lib`. +pub fn configurable_package_name_hack() -> proc_macro2::TokenStream { + // `TokenStream2` does not implement `Sync`, so we can't use it directly in `OnceLock`. As such, + // this hack needs to recreate the package name token stream each time. We can also not return a + // string type, which could be stored in the `OnceLock`, as one of the options is a multi-token + // value and the string will always be parsed as a single token. + static RUNNING_IN_LIB: OnceLock = OnceLock::new(); + // We can't use `env!("CARGO_PKG_NAME")` to be able to create a `const`, as that is evaluated + // once when this macro package is built rather than when they are evaluated. This has to be + // evaluated in the context of the package in which the macro is being expanded. + let running_in_lib = *RUNNING_IN_LIB.get_or_init(|| { + let package = std::env::var("CARGO_PKG_NAME").expect("Must be built by cargo"); + package.starts_with("vector-") || package == "file-source" || package == "codecs" + }); + if running_in_lib { + syn::parse_quote! { ::vector_config } + } else { + syn::parse_quote! { ::vector_lib::configurable } + } +} diff --git a/lib/vector-config-common/src/validation.rs b/lib/vector-config-common/src/validation.rs index 569f80cf33007..b8209cba097a1 100644 --- a/lib/vector-config-common/src/validation.rs +++ b/lib/vector-config-common/src/validation.rs @@ -4,6 +4,7 @@ use quote::{quote, ToTokens}; use syn::{Expr, Lit, Meta}; use crate::{ + configurable_package_name_hack, num::{ERR_NUMERIC_OUT_OF_RANGE, NUMERIC_ENFORCED_LOWER_BOUND, NUMERIC_ENFORCED_UPPER_BOUND}, schema::{InstanceType, SchemaObject}, }; @@ -138,18 +139,19 @@ impl Format { impl ToTokens for Format { fn to_tokens(&self, tokens: &mut TokenStream) { + let vector_config = configurable_package_name_hack(); let format_tokens = match self { - Format::Date => quote! { ::vector_config::validation::Format::Date }, - Format::Time => quote! { ::vector_config::validation::Format::Time }, - Format::DateTime => quote! { ::vector_config::validation::Format::DateTime }, - Format::Duration => quote! { ::vector_config::validation::Format::Duration }, - Format::Email => quote! { ::vector_config::validation::Format::Email }, - Format::Hostname => quote! { ::vector_config::validation::Format::Hostname }, - Format::Uri => quote! { ::vector_config::validation::Format::Uri }, - Format::IPv4 => quote! { ::vector_config::validation::Format::IPv4 }, - Format::IPv6 => quote! { ::vector_config::validation::Format::IPv6 }, - Format::Uuid => quote! { ::vector_config::validation::Format::Uuid }, - Format::Regex => quote! { ::vector_config::validation::Format::Regex }, + Format::Date => quote! { #vector_config::validation::Format::Date }, + Format::Time => quote! { #vector_config::validation::Format::Time }, + Format::DateTime => quote! { #vector_config::validation::Format::DateTime }, + Format::Duration => quote! { #vector_config::validation::Format::Duration }, + Format::Email => quote! { #vector_config::validation::Format::Email }, + Format::Hostname => quote! { #vector_config::validation::Format::Hostname }, + Format::Uri => quote! { #vector_config::validation::Format::Uri }, + Format::IPv4 => quote! { #vector_config::validation::Format::IPv4 }, + Format::IPv6 => quote! { #vector_config::validation::Format::IPv6 }, + Format::Uuid => quote! { #vector_config::validation::Format::Uuid }, + Format::Regex => quote! { #vector_config::validation::Format::Regex }, }; tokens.extend(format_tokens); @@ -292,24 +294,25 @@ impl Validation { impl ToTokens for Validation { fn to_tokens(&self, tokens: &mut TokenStream) { + let vector_config = configurable_package_name_hack(); let validation_tokens = match self { Validation::KnownFormat(format) => { - quote! { ::vector_config::validation::Validation::KnownFormat(#format) } + quote! { #vector_config::validation::Validation::KnownFormat(#format) } } Validation::Length { minimum, maximum } => { let min_tokens = option_as_token(*minimum); let max_tokens = option_as_token(*maximum); - quote! { ::vector_config::validation::Validation::Length { minimum: #min_tokens, maximum: #max_tokens } } + quote! { #vector_config::validation::Validation::Length { minimum: #min_tokens, maximum: #max_tokens } } } Validation::Range { minimum, maximum } => { let min_tokens = option_as_token(*minimum); let max_tokens = option_as_token(*maximum); - quote! { ::vector_config::validation::Validation::Range { minimum: #min_tokens, maximum: #max_tokens } } + quote! { #vector_config::validation::Validation::Range { minimum: #min_tokens, maximum: #max_tokens } } } Validation::Pattern(pattern) => { - quote! { ::vector_config::validation::Validation::Pattern(#pattern.to_string()) } + quote! { #vector_config::validation::Validation::Pattern(#pattern.to_string()) } } }; diff --git a/lib/vector-config-macros/src/ast/field.rs b/lib/vector-config-macros/src/ast/field.rs index 09f2d85a33dc5..b473cd675a349 100644 --- a/lib/vector-config-macros/src/ast/field.rs +++ b/lib/vector-config-macros/src/ast/field.rs @@ -6,7 +6,7 @@ use proc_macro2::{Span, TokenStream}; use quote::ToTokens; use serde_derive_internals::ast as serde_ast; use syn::{parse_quote, ExprPath, Ident}; -use vector_config_common::validation::Validation; +use vector_config_common::{configurable_package_name_hack, validation::Validation}; use super::{ util::{ @@ -352,7 +352,8 @@ impl Attributes { // serialize wrapper, since we know we'll have to do that in a few different places // during codegen, so it's cleaner to do it here. let field_ty = field.ty; - parse_quote! { ::vector_config::ser::Delegated<#field_ty, #virtual_ty> } + let vector_config = configurable_package_name_hack(); + parse_quote! { #vector_config::ser::Delegated<#field_ty, #virtual_ty> } }); Ok(self) diff --git a/lib/vector-config-macros/src/component_name.rs b/lib/vector-config-macros/src/component_name.rs index 8c7e5efd2e65e..77e07c7f79470 100644 --- a/lib/vector-config-macros/src/component_name.rs +++ b/lib/vector-config-macros/src/component_name.rs @@ -3,6 +3,7 @@ use proc_macro::TokenStream; use quote::quote; use syn::{parse_macro_input, spanned::Spanned, Attribute, DeriveInput, Error, LitStr}; +use vector_config_common::configurable_package_name_hack; use crate::attrs::{self, path_matches}; @@ -89,12 +90,13 @@ pub fn derive_component_name_impl(input: TokenStream) -> TokenStream { // We have a single, valid component name, so let's actually spit out our derive. let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + let vector_config = configurable_package_name_hack(); let derived = quote! { impl #impl_generics #ident #ty_generics #where_clause { pub(super) const NAME: &'static str = #component_name; } - impl #impl_generics ::vector_config::NamedComponent for #ident #ty_generics #where_clause { + impl #impl_generics #vector_config::NamedComponent for #ident #ty_generics #where_clause { fn get_component_name(&self) -> &'static str { #component_name } diff --git a/lib/vector-config-macros/src/configurable.rs b/lib/vector-config-macros/src/configurable.rs index b26e317b998f5..cc39c1fa3401f 100644 --- a/lib/vector-config-macros/src/configurable.rs +++ b/lib/vector-config-macros/src/configurable.rs @@ -5,7 +5,7 @@ use syn::{ parse_macro_input, parse_quote, spanned::Spanned, token::PathSep, DeriveInput, ExprPath, Ident, PathArguments, Type, }; -use vector_config_common::validation::Validation; +use vector_config_common::{configurable_package_name_hack, validation::Validation}; use crate::ast::{Container, Data, Field, LazyCustomAttribute, Style, Tagging, Variant}; @@ -25,6 +25,7 @@ pub fn derive_configurable_impl(input: TokenStream) -> TokenStream { }; let mut generics = container.generics().clone(); + let vector_config = configurable_package_name_hack(); // We need to construct an updated where clause that properly constrains any generic types which are used as fields // on the container. We _only_ care about fields that are pure generic types, because anything that's a concrete @@ -35,7 +36,7 @@ pub fn derive_configurable_impl(input: TokenStream) -> TokenStream { let where_clause = generics.make_where_clause(); for typ in generic_field_types { let ty = &typ.ident; - let predicate = parse_quote! { #ty: ::vector_config::Configurable + ::serde::Serialize + ::vector_config::ToValue }; + let predicate = parse_quote! { #ty: #vector_config::Configurable + ::serde::Serialize + #vector_config::ToValue }; where_clause.predicates.push(predicate); } @@ -64,7 +65,7 @@ pub fn derive_configurable_impl(input: TokenStream) -> TokenStream { const _: () = { #[automatically_derived] #[allow(unused_qualifications)] - impl #impl_generics ::vector_config::Configurable for #name #ty_generics #where_clause { + impl #impl_generics #vector_config::Configurable for #name #ty_generics #where_clause { fn referenceable_name() -> Option<&'static str> { // If the type name we get back from `std::any::type_name` doesn't start with // the module path, use a concatenated version. @@ -97,7 +98,7 @@ pub fn derive_configurable_impl(input: TokenStream) -> TokenStream { #generate_schema_fn } - impl #impl_generics ::vector_config::ToValue for #name #ty_generics #where_clause { + impl #impl_generics #vector_config::ToValue for #name #ty_generics #where_clause { #to_value_fn } }; @@ -109,9 +110,10 @@ pub fn derive_configurable_impl(input: TokenStream) -> TokenStream { fn build_metadata_fn(container: &Container<'_>) -> proc_macro2::TokenStream { let meta_ident = Ident::new("metadata", Span::call_site()); let container_metadata = generate_container_metadata(&meta_ident, container); + let vector_config = configurable_package_name_hack(); quote! { - fn metadata() -> ::vector_config::Metadata { + fn metadata() -> #vector_config::Metadata { #container_metadata #meta_ident } @@ -119,19 +121,21 @@ fn build_metadata_fn(container: &Container<'_>) -> proc_macro2::TokenStream { } fn build_to_value_fn(_container: &Container<'_>) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); quote! { - fn to_value(&self) -> ::vector_config::serde_json::Value { - ::vector_config::serde_json::to_value(self) + fn to_value(&self) -> #vector_config::serde_json::Value { + #vector_config::serde_json::to_value(self) .expect("Could not convert value to JSON") } } } fn build_virtual_newtype_schema_fn(virtual_ty: Type) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); quote! { - fn generate_schema(schema_gen: &::std::cell::RefCell<::vector_config::schema::SchemaGenerator>) -> std::result::Result<::vector_config::schema::SchemaObject, ::vector_config::GenerateError> { - ::vector_config::schema::get_or_generate_schema( - &<#virtual_ty as ::vector_config::Configurable>::as_configurable_ref(), + fn generate_schema(schema_gen: &::std::cell::RefCell<#vector_config::schema::SchemaGenerator>) -> std::result::Result<#vector_config::schema::SchemaObject, #vector_config::GenerateError> { + #vector_config::schema::get_or_generate_schema( + &<#virtual_ty as #vector_config::Configurable>::as_configurable_ref(), schema_gen, None, ) @@ -143,6 +147,8 @@ fn build_enum_generate_schema_fn( container: &Container, variants: &[Variant<'_>], ) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); + // First, figure out if we have a potentially "ambiguous" enum schema. This will influence the // code we generate, which will, at runtime, attempt to figure out if we need to emit an `anyOf` // schema, rather than a `oneOf` schema, to handle validation of enums where variants overlap in @@ -165,15 +171,15 @@ fn build_enum_generate_schema_fn( // If we never generate any entries in the discriminant map, then this will end up just calling // the `oneOf` method. let generate_block = quote! { - if ::vector_config::schema::has_ambiguous_discriminants(&discriminant_map) { - Ok(::vector_config::schema::generate_any_of_schema(&subschemas)) + if #vector_config::schema::has_ambiguous_discriminants(&discriminant_map) { + Ok(#vector_config::schema::generate_any_of_schema(&subschemas)) } else { - Ok(::vector_config::schema::generate_one_of_schema(&subschemas)) + Ok(#vector_config::schema::generate_one_of_schema(&subschemas)) } }; quote! { - fn generate_schema(schema_gen: &::std::cell::RefCell<::vector_config::schema::SchemaGenerator>) -> std::result::Result<::vector_config::schema::SchemaObject, ::vector_config::GenerateError> { + fn generate_schema(schema_gen: &::std::cell::RefCell<#vector_config::schema::SchemaGenerator>) -> std::result::Result<#vector_config::schema::SchemaObject, #vector_config::GenerateError> { let mut subschemas = ::std::vec::Vec::new(); let mut discriminant_map = ::std::collections::HashMap::new(); @@ -226,9 +232,10 @@ fn generate_struct_field(field: &Field<'_>) -> proc_macro2::TokenStream { let field_metadata = generate_field_metadata(&field_metadata_ref, field); let field_schema_ty = get_field_schema_ty(field); + let vector_config = configurable_package_name_hack(); let spanned_generate_schema = quote_spanned! {field.span()=> - ::vector_config::schema::get_or_generate_schema( - &<#field_schema_ty as ::vector_config::Configurable>::as_configurable_ref(), + #vector_config::schema::get_or_generate_schema( + &<#field_schema_ty as #vector_config::Configurable>::as_configurable_ref(), schema_gen, Some(#field_metadata_ref), )? @@ -256,6 +263,7 @@ fn generate_named_struct_field( let field_key = field.name(); let field_schema = generate_struct_field(field); + let vector_config = configurable_package_name_hack(); // If the field is flattened, we store it into a different list of flattened subschemas vs adding it directly as a // field via `properties`/`required`. @@ -271,7 +279,7 @@ fn generate_named_struct_field( // field is a part of, then we consider it required unless the field type itself is inherently // optional, such as being `Option`. let spanned_is_optional = quote_spanned! {field.span()=> - <#field_schema_ty as ::vector_config::Configurable>::is_optional() + <#field_schema_ty as #vector_config::Configurable>::is_optional() }; let maybe_field_required = if container.default_value().is_none() && field.default_value().is_none() { @@ -316,6 +324,7 @@ fn build_named_struct_generate_schema_fn( container: &Container<'_>, fields: &[Field<'_>], ) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); let mapped_fields = fields .iter() // Don't map this field if it's marked to be skipped for both serialization and deserialization. @@ -323,18 +332,18 @@ fn build_named_struct_generate_schema_fn( .map(|field| generate_named_struct_field(container, field)); quote! { - fn generate_schema(schema_gen: &::std::cell::RefCell<::vector_config::schema::SchemaGenerator>) -> std::result::Result<::vector_config::schema::SchemaObject, ::vector_config::GenerateError> { - let mut properties = ::vector_config::indexmap::IndexMap::new(); + fn generate_schema(schema_gen: &::std::cell::RefCell<#vector_config::schema::SchemaGenerator>) -> std::result::Result<#vector_config::schema::SchemaObject, #vector_config::GenerateError> { + let mut properties = #vector_config::indexmap::IndexMap::new(); let mut required = ::std::collections::BTreeSet::new(); let mut flattened_subschemas = ::std::vec::Vec::new(); - let metadata = ::metadata(); + let metadata = ::metadata(); #(#mapped_fields)* let had_unflatted_properties = !properties.is_empty(); let additional_properties = None; - let mut schema = ::vector_config::schema::generate_struct_schema( + let mut schema = #vector_config::schema::generate_struct_schema( properties, required, additional_properties, @@ -352,7 +361,7 @@ fn build_named_struct_generate_schema_fn( schema = flattened_subschemas.remove(0); } - ::vector_config::schema::convert_to_flattened_schema(&mut schema, flattened_subschemas); + #vector_config::schema::convert_to_flattened_schema(&mut schema, flattened_subschemas); } Ok(schema) @@ -361,6 +370,7 @@ fn build_named_struct_generate_schema_fn( } fn build_tuple_struct_generate_schema_fn(fields: &[Field<'_>]) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); let mapped_fields = fields .iter() // Don't map this field if it's marked to be skipped for both serialization and deserialization. @@ -368,12 +378,12 @@ fn build_tuple_struct_generate_schema_fn(fields: &[Field<'_>]) -> proc_macro2::T .map(generate_tuple_struct_field); quote! { - fn generate_schema(schema_gen: &::std::cell::RefCell<::vector_config::schema::SchemaGenerator>) -> std::result::Result<::vector_config::schema::SchemaObject, ::vector_config::GenerateError> { + fn generate_schema(schema_gen: &::std::cell::RefCell<#vector_config::schema::SchemaGenerator>) -> std::result::Result<#vector_config::schema::SchemaObject, #vector_config::GenerateError> { let mut subschemas = ::std::collections::Vec::new(); #(#mapped_fields)* - Ok(::vector_config::schema::generate_tuple_schema(&subschemas)) + Ok(#vector_config::schema::generate_tuple_schema(&subschemas)) } } } @@ -392,9 +402,10 @@ fn build_newtype_struct_generate_schema_fn(fields: &[Field<'_>]) -> proc_macro2: } let field_schema = mapped_fields.remove(0); + let vector_config = configurable_package_name_hack(); quote! { - fn generate_schema(schema_gen: &::std::cell::RefCell<::vector_config::schema::SchemaGenerator>) -> std::result::Result<::vector_config::schema::SchemaObject, ::vector_config::GenerateError> { + fn generate_schema(schema_gen: &::std::cell::RefCell<#vector_config::schema::SchemaGenerator>) -> std::result::Result<#vector_config::schema::SchemaObject, #vector_config::GenerateError> { #field_schema Ok(subschema) @@ -427,8 +438,9 @@ fn generate_container_metadata( let enum_metadata = get_metadata_custom_attributes(meta_ident, enum_metadata_attrs.into_iter().flatten()); + let vector_config = configurable_package_name_hack(); quote! { - let mut #meta_ident = ::vector_config::Metadata::default(); + let mut #meta_ident = #vector_config::Metadata::default(); #maybe_title #maybe_description #maybe_default_value @@ -470,8 +482,9 @@ fn generate_field_metadata(meta_ident: &Ident, field: &Field<'_>) -> proc_macro2 let maybe_validation = get_metadata_validation(meta_ident, field.validation()); let maybe_custom_attributes = get_metadata_custom_attributes(meta_ident, field.metadata()); + let vector_config = configurable_package_name_hack(); quote! { - let mut #meta_ident = ::vector_config::Metadata::default(); + let mut #meta_ident = #vector_config::Metadata::default(); #maybe_clear_title_description #maybe_title #maybe_description @@ -516,8 +529,9 @@ fn generate_variant_metadata( // variant, but there's no unique concrete type for a variant, only the type of the enum // container it exists within. We also don't want to use the metadata of the enum container, as // it might have values that would conflict with the metadata of this specific variant. + let vector_config = configurable_package_name_hack(); quote! { - let mut #meta_ident = ::vector_config::Metadata::default(); + let mut #meta_ident = #vector_config::Metadata::default(); #maybe_title #maybe_description #maybe_deprecated @@ -540,8 +554,9 @@ fn generate_variant_tag_metadata( // variant, but there's no unique concrete type for a variant, only the type of the enum // container it exists within. We also don't want to use the metadata of the enum container, as // it might have values that would conflict with the metadata of this specific variant. + let vector_config = configurable_package_name_hack(); quote! { - let mut #meta_ident = ::vector_config::Metadata::default(); + let mut #meta_ident = #vector_config::Metadata::default(); #maybe_title #maybe_description } @@ -644,13 +659,14 @@ fn get_metadata_custom_attributes( meta_ident: &Ident, custom_attributes: impl Iterator, ) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); let mapped_custom_attributes = custom_attributes .map(|attr| match attr { LazyCustomAttribute::Flag(key) => quote! { - #meta_ident.add_custom_attribute(::vector_config_common::attributes::CustomAttribute::flag(#key)); + #meta_ident.add_custom_attribute(#vector_config::attributes::CustomAttribute::flag(#key)); }, LazyCustomAttribute::KeyValue { key, value } => quote! { - #meta_ident.add_custom_attribute(::vector_config_common::attributes::CustomAttribute::kv( + #meta_ident.add_custom_attribute(#vector_config::attributes::CustomAttribute::kv( #key, #value )); }, @@ -685,8 +701,9 @@ fn generate_named_enum_field(field: &Field<'_>) -> proc_macro2::TokenStream { // Fields that have no default value are inherently required. Unlike fields on a normal // struct, we can't derive a default value for an individual field because `serde` // doesn't allow even specifying a default value for an enum overall, only structs. + let vector_config = configurable_package_name_hack(); let spanned_is_optional = quote_spanned! {field.span()=> - <#field_ty as ::vector_config::Configurable>::is_optional() + <#field_ty as #vector_config::Configurable>::is_optional() }; let maybe_field_required = if field.default_value().is_none() { Some(quote! { @@ -729,9 +746,10 @@ fn generate_enum_struct_named_variant_schema( } }); + let vector_config = configurable_package_name_hack(); quote! { { - let mut properties = ::vector_config::indexmap::IndexMap::new(); + let mut properties = #vector_config::indexmap::IndexMap::new(); let mut required = ::std::collections::BTreeSet::new(); #(#mapped_fields)* @@ -740,7 +758,7 @@ fn generate_enum_struct_named_variant_schema( #maybe_fill_discriminant_map - ::vector_config::schema::generate_struct_schema( + #vector_config::schema::generate_struct_schema( properties, required, None @@ -769,9 +787,10 @@ fn generate_enum_variant_tag_schema(variant: &Variant<'_>) -> proc_macro2::Token let variant_name = variant.name(); let apply_variant_tag_metadata = generate_enum_variant_tag_apply_metadata(variant); + let vector_config = configurable_package_name_hack(); quote! { { - let mut tag_subschema = ::vector_config::schema::generate_const_string_schema(#variant_name.to_string()); + let mut tag_subschema = #vector_config::schema::generate_const_string_schema(#variant_name.to_string()); #apply_variant_tag_metadata tag_subschema } @@ -790,6 +809,7 @@ fn generate_enum_variant_schema( // Unnamed(bool), // Unit, // } + let vector_config = configurable_package_name_hack(); let variant_name = variant.name(); let variant_schema = match variant.tagging() { // The variant is represented "externally" by wrapping the contents of the variant as an @@ -874,12 +894,12 @@ fn generate_enum_variant_schema( let tag_schema = generate_enum_variant_tag_schema(variant); quote! { - let tag_schema = ::vector_config::schema::generate_internal_tagged_variant_schema(#tag.to_string(), #tag_schema); + let tag_schema = #vector_config::schema::generate_internal_tagged_variant_schema(#tag.to_string(), #tag_schema); let mut flattened_subschemas = ::std::vec::Vec::new(); flattened_subschemas.push(tag_schema); let mut newtype_schema = #newtype_schema; - ::vector_config::schema::convert_to_flattened_schema(&mut newtype_schema, flattened_subschemas); + #vector_config::schema::convert_to_flattened_schema(&mut newtype_schema, flattened_subschemas); newtype_schema } @@ -926,7 +946,7 @@ fn generate_enum_variant_schema( }); quote! { - let mut wrapper_properties = ::vector_config::indexmap::IndexMap::new(); + let mut wrapper_properties = #vector_config::indexmap::IndexMap::new(); let mut wrapper_required = ::std::collections::BTreeSet::new(); wrapper_properties.insert(#tag.to_string(), #tag_schema); @@ -934,7 +954,7 @@ fn generate_enum_variant_schema( #maybe_content_schema - ::vector_config::schema::generate_struct_schema( + #vector_config::schema::generate_struct_schema( wrapper_properties, wrapper_required, None @@ -973,7 +993,7 @@ fn generate_enum_variant_schema( ), Style::Tuple => panic!("tuple variants should be rejected during AST parsing"), Style::Newtype => generate_enum_newtype_struct_variant_schema(variant), - Style::Unit => quote! { ::vector_config::schema::generate_null_schema() }, + Style::Unit => quote! { #vector_config::schema::generate_null_schema() }, } } }; @@ -985,15 +1005,16 @@ fn generate_single_field_struct_schema( property_name: &str, property_schema: proc_macro2::TokenStream, ) -> proc_macro2::TokenStream { + let vector_config = configurable_package_name_hack(); quote! { { - let mut wrapper_properties = ::vector_config::indexmap::IndexMap::new(); + let mut wrapper_properties = #vector_config::indexmap::IndexMap::new(); let mut wrapper_required = ::std::collections::BTreeSet::new(); wrapper_properties.insert(#property_name.to_string(), #property_schema); wrapper_required.insert(#property_name.to_string()); - ::vector_config::schema::generate_struct_schema( + #vector_config::schema::generate_struct_schema( wrapper_properties, wrapper_required, None @@ -1006,9 +1027,10 @@ fn generate_enum_variant_apply_metadata(variant: &Variant<'_>) -> proc_macro2::T let variant_metadata_ref = Ident::new("variant_metadata", Span::call_site()); let variant_metadata = generate_variant_metadata(&variant_metadata_ref, variant); + let vector_config = configurable_package_name_hack(); quote! { #variant_metadata - ::vector_config::schema::apply_base_metadata(&mut subschema, #variant_metadata_ref); + #vector_config::schema::apply_base_metadata(&mut subschema, #variant_metadata_ref); } } @@ -1016,9 +1038,10 @@ fn generate_enum_variant_tag_apply_metadata(variant: &Variant<'_>) -> proc_macro let variant_tag_metadata_ref = Ident::new("variant_tag_metadata", Span::call_site()); let variant_tag_metadata = generate_variant_tag_metadata(&variant_tag_metadata_ref, variant); + let vector_config = configurable_package_name_hack(); quote! { #variant_tag_metadata - ::vector_config::schema::apply_base_metadata(&mut tag_subschema, #variant_tag_metadata_ref); + #vector_config::schema::apply_base_metadata(&mut tag_subschema, #variant_tag_metadata_ref); } } diff --git a/lib/vector-config-macros/src/configurable_component.rs b/lib/vector-config-macros/src/configurable_component.rs index 42d7813768aa6..8aa35c097f6a8 100644 --- a/lib/vector-config-macros/src/configurable_component.rs +++ b/lib/vector-config-macros/src/configurable_component.rs @@ -7,7 +7,8 @@ use syn::{ token::Comma, DeriveInput, Lit, LitStr, Meta, MetaList, Path, }; use vector_config_common::{ - constants::ComponentType, human_friendly::generate_human_friendly_string, + configurable_package_name_hack, constants::ComponentType, + human_friendly::generate_human_friendly_string, }; use crate::attrs; @@ -78,24 +79,25 @@ impl TypedComponent { &self, input: &DeriveInput, ) -> Option { + let vector_config = configurable_package_name_hack(); self.component_name.as_ref().map(|component_name| { let config_ty = &input.ident; let desc_ty: syn::Type = match self.component_type { ComponentType::EnrichmentTable => { - parse_quote! { ::vector_config::component::EnrichmentTableDescription } + parse_quote! { #vector_config::component::EnrichmentTableDescription } } ComponentType::Provider => { - parse_quote! { ::vector_config::component::ProviderDescription } + parse_quote! { #vector_config::component::ProviderDescription } } ComponentType::Secrets => { - parse_quote! { ::vector_config::component::SecretsDescription } + parse_quote! { #vector_config::component::SecretsDescription } } - ComponentType::Sink => parse_quote! { ::vector_config::component::SinkDescription }, + ComponentType::Sink => parse_quote! { #vector_config::component::SinkDescription }, ComponentType::Source => { - parse_quote! { ::vector_config::component::SourceDescription } + parse_quote! { #vector_config::component::SourceDescription } } ComponentType::Transform => { - parse_quote! { ::vector_config::component::TransformDescription } + parse_quote! { #vector_config::component::TransformDescription } } }; @@ -129,13 +131,14 @@ impl TypedComponent { /// Creates the component name registration code. fn get_component_name_registration(&self) -> proc_macro2::TokenStream { let helper_attr = get_named_component_helper_ident(self.component_type); + let vector_config = configurable_package_name_hack(); match self.component_name.as_ref() { None => quote_spanned! {self.span=> - #[derive(::vector_config_macros::NamedComponent)] + #[derive(#vector_config::NamedComponent)] #[#helper_attr] }, Some(component_name) => quote_spanned! {self.span=> - #[derive(::vector_config_macros::NamedComponent)] + #[derive(#vector_config::NamedComponent)] #[#helper_attr(#component_name)] }, } @@ -306,8 +309,9 @@ pub fn configurable_component_impl(args: TokenStream, item: TokenStream) -> Toke // Generate and apply all of the necessary derives. let mut derives = Punctuated::::new(); + let vector_config = configurable_package_name_hack(); derives.push(parse_quote_spanned! {input.ident.span()=> - ::vector_config_macros::Configurable + #vector_config::Configurable }); if !options.skip_derive_ser() { diff --git a/lib/vector-config/src/lib.rs b/lib/vector-config/src/lib.rs index b18a6897505fd..4232fbeac8256 100644 --- a/lib/vector-config/src/lib.rs +++ b/lib/vector-config/src/lib.rs @@ -138,9 +138,7 @@ pub use vector_config_macros::*; // The crate exists so that both `vector_config_macros` and `vector_config` can import the types and work with them // natively, but from a codegen and usage perspective, it's much cleaner to export everything needed to use // `Configurable` from `vector_config` itself, and not leak out the crate arrangement as an impl detail. -pub mod validation { - pub use vector_config_common::validation::*; -} +pub use vector_config_common::{attributes, validation}; #[doc(hidden)] pub fn __ensure_numeric_validation_bounds(metadata: &Metadata) -> Result<(), GenerateError> diff --git a/lib/vector-lib/Cargo.toml b/lib/vector-lib/Cargo.toml index a66408303abb5..dcc4c585f6020 100644 --- a/lib/vector-lib/Cargo.toml +++ b/lib/vector-lib/Cargo.toml @@ -6,7 +6,8 @@ edition = "2021" publish = false [dependencies] -vector-common = { path = "../vector-common", default-features = false } +vector-common = { path = "../vector-common" } +vector-config = { path = "../vector-config" } vector-core = { path = "../vector-core", default-features = false } [features] diff --git a/lib/vector-lib/src/lib.rs b/lib/vector-lib/src/lib.rs index 166bdac69c17a..0e81ca7cbb9bc 100644 --- a/lib/vector-lib/src/lib.rs +++ b/lib/vector-lib/src/lib.rs @@ -4,6 +4,7 @@ pub use vector_common::{ registered_event, request_metadata, sensitive_string, shutdown, trigger, Error, Result, TimeZone, }; +pub use vector_config as configurable; #[cfg(feature = "vrl")] pub use vector_core::compile_vrl; #[cfg(feature = "test")] diff --git a/src/amqp.rs b/src/amqp.rs index 247ad4d03099e..4fe87d86962de 100644 --- a/src/amqp.rs +++ b/src/amqp.rs @@ -1,6 +1,6 @@ //! Functionality supporting both the `[crate::sources::amqp]` source and `[crate::sinks::amqp]` sink. use lapin::tcp::{OwnedIdentity, OwnedTLSConfig}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// AMQP connection options. #[configurable_component] diff --git a/src/aws/auth.rs b/src/aws/auth.rs index 776a57f4c25b6..715f494f7f694 100644 --- a/src/aws/auth.rs +++ b/src/aws/auth.rs @@ -14,7 +14,7 @@ use aws_credential_types::{ }; use aws_types::region::Region; use serde_with::serde_as; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; // matches default load timeout from the SDK as of 0.10.1, but lets us confidently document the diff --git a/src/aws/region.rs b/src/aws/region.rs index b9db93a56bf5f..506812d81df7a 100644 --- a/src/aws/region.rs +++ b/src/aws/region.rs @@ -1,5 +1,5 @@ use aws_types::region::Region; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Configuration of the region/endpoint to use when interacting with an AWS service. #[configurable_component] diff --git a/src/codecs/encoding/config.rs b/src/codecs/encoding/config.rs index c2e6b57106c4f..6f974e4d7854c 100644 --- a/src/codecs/encoding/config.rs +++ b/src/codecs/encoding/config.rs @@ -3,7 +3,7 @@ use codecs::{ encoding::{Framer, FramingConfig, Serializer, SerializerConfig}, CharacterDelimitedEncoder, LengthDelimitedEncoder, NewlineDelimitedEncoder, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Encoding configuration. #[configurable_component] diff --git a/src/codecs/encoding/transformer.rs b/src/codecs/encoding/transformer.rs index d919a8872a39b..126d526935699 100644 --- a/src/codecs/encoding/transformer.rs +++ b/src/codecs/encoding/transformer.rs @@ -8,7 +8,7 @@ use lookup::lookup_v2::ConfigValuePath; use lookup::{event_path, PathPrefix}; use ordered_float::NotNan; use serde::{Deserialize, Deserializer}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::event::{LogEvent, MaybeAsLogMut}; use vector_lib::schema::meaning; use vrl::path::OwnedValuePath; diff --git a/src/conditions/datadog_search.rs b/src/conditions/datadog_search.rs index 1f11edc86e2e9..d5f1ddcdd2513 100644 --- a/src/conditions/datadog_search.rs +++ b/src/conditions/datadog_search.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use bytes::Bytes; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::event::{Event, LogEvent, Value}; use vrl::datadog_filter::{ build_matcher, diff --git a/src/conditions/mod.rs b/src/conditions/mod.rs index a55c84a2f163a..f1dc829daf42a 100644 --- a/src/conditions/mod.rs +++ b/src/conditions/mod.rs @@ -1,5 +1,5 @@ #![allow(missing_docs)] -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::event::Event; diff --git a/src/conditions/vrl.rs b/src/conditions/vrl.rs index 7cd39712ceb2a..16cae9bff6006 100644 --- a/src/conditions/vrl.rs +++ b/src/conditions/vrl.rs @@ -1,5 +1,5 @@ -use vector_config::configurable_component; use vector_lib::compile_vrl; +use vector_lib::configurable::configurable_component; use vector_lib::TimeZone; use vrl::compiler::runtime::{Runtime, RuntimeResult, Terminate}; use vrl::compiler::{CompilationResult, CompileConfig, Program, TypeState, VrlRuntime}; diff --git a/src/config/api.rs b/src/config/api.rs index 280851ad249f7..2da33bc134152 100644 --- a/src/config/api.rs +++ b/src/config/api.rs @@ -1,7 +1,7 @@ use std::net::{Ipv4Addr, SocketAddr}; use url::Url; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// API options. #[configurable_component] diff --git a/src/config/builder.rs b/src/config/builder.rs index e7968fd587e37..e3febfba5843a 100644 --- a/src/config/builder.rs +++ b/src/config/builder.rs @@ -5,8 +5,8 @@ use std::{path::Path, time::Duration}; use indexmap::IndexMap; #[cfg(feature = "enterprise")] use serde_json::Value; -use vector_config::configurable_component; use vector_lib::config::GlobalOptions; +use vector_lib::configurable::configurable_component; use crate::{enrichment_tables::EnrichmentTables, providers::Providers, secrets::SecretBackends}; diff --git a/src/config/cmd.rs b/src/config/cmd.rs index 64b04aeafb546..7a2ac61e9b14e 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -200,7 +200,9 @@ mod tests { SeedableRng, }; use serde_json::json; - use vector_config::component::{SinkDescription, SourceDescription, TransformDescription}; + use vector_lib::configurable::component::{ + SinkDescription, SourceDescription, TransformDescription, + }; use crate::config::Format; use crate::{ diff --git a/src/config/enrichment_table.rs b/src/config/enrichment_table.rs index 6d4f9d06ffdc6..4810638df83ca 100644 --- a/src/config/enrichment_table.rs +++ b/src/config/enrichment_table.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use enum_dispatch::enum_dispatch; -use vector_config::{configurable_component, NamedComponent}; use vector_lib::config::GlobalOptions; +use vector_lib::configurable::{configurable_component, NamedComponent}; use crate::enrichment_tables::EnrichmentTables; diff --git a/src/config/enterprise.rs b/src/config/enterprise.rs index 8aea56f058251..f964694348eb7 100644 --- a/src/config/enterprise.rs +++ b/src/config/enterprise.rs @@ -38,7 +38,7 @@ use crate::{ }, transforms::{filter::FilterConfig, remap::RemapConfig}, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; static HOST_METRICS_KEY: &str = "_datadog_host_metrics"; static TAG_METRICS_KEY: &str = "_datadog_tag_metrics"; diff --git a/src/config/id.rs b/src/config/id.rs index 253ec0c35cb44..f38779546f255 100644 --- a/src/config/id.rs +++ b/src/config/id.rs @@ -1,7 +1,7 @@ use std::ops::Deref; -use vector_config::configurable_component; pub use vector_lib::config::ComponentKey; +use vector_lib::configurable::configurable_component; /// A list of upstream [source][sources] or [transform][transforms] IDs. /// diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index 092fc826dac6e..ad5fe33371e79 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -18,7 +18,7 @@ use loader::process::Process; pub use loader::*; pub use secret::*; pub use source::*; -use vector_config::NamedComponent; +use vector_lib::configurable::NamedComponent; use super::{ builder::ConfigBuilder, format, validation, vars, Config, ConfigPath, Format, FormatHint, diff --git a/src/config/mod.rs b/src/config/mod.rs index 7999f13e24d72..5386cdcc2d147 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -10,12 +10,14 @@ use std::{ use indexmap::IndexMap; use serde::Serialize; -pub use vector_config::component::{GenerateConfig, SinkDescription, TransformDescription}; -use vector_config::configurable_component; pub use vector_lib::config::{ AcknowledgementsConfig, DataType, GlobalOptions, Input, LogNamespace, SourceAcknowledgementsConfig, SourceOutput, TransformOutput, }; +pub use vector_lib::configurable::component::{ + GenerateConfig, SinkDescription, TransformDescription, +}; +use vector_lib::configurable::configurable_component; use crate::{conditions, event::Metric, secrets::SecretBackends, serde::OneOrMany}; @@ -1421,7 +1423,7 @@ mod resource_tests { #[cfg(all(test, feature = "sources-stdin", feature = "sinks-console"))] mod resource_config_tests { use indoc::indoc; - use vector_config::schema::generate_root_schema; + use vector_lib::configurable::schema::generate_root_schema; use super::{load_from_str, Format}; @@ -1452,8 +1454,8 @@ mod resource_config_tests { fn generate_component_config_schema() { use crate::config::{SinkOuter, SourceOuter, TransformOuter}; use indexmap::IndexMap; - use vector_config::configurable_component; use vector_lib::config::ComponentKey; + use vector_lib::configurable::configurable_component; /// Top-level Vector configuration. #[configurable_component] diff --git a/src/config/provider.rs b/src/config/provider.rs index 14152ce93372c..f2ae9595ee2c4 100644 --- a/src/config/provider.rs +++ b/src/config/provider.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use enum_dispatch::enum_dispatch; -use vector_config::NamedComponent; +use vector_lib::configurable::NamedComponent; use crate::{providers::BuildResult, signal}; diff --git a/src/config/schema.rs b/src/config/schema.rs index 1a0b5d276e4e6..2245e84e758f3 100644 --- a/src/config/schema.rs +++ b/src/config/schema.rs @@ -1,5 +1,5 @@ -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; pub(crate) use crate::schema::Definition; diff --git a/src/config/secret.rs b/src/config/secret.rs index a77bb040d8ece..7bf7d66fd4d42 100644 --- a/src/config/secret.rs +++ b/src/config/secret.rs @@ -1,7 +1,7 @@ use std::collections::{HashMap, HashSet}; use enum_dispatch::enum_dispatch; -use vector_config::NamedComponent; +use vector_lib::configurable::NamedComponent; use crate::signal; diff --git a/src/config/sink.rs b/src/config/sink.rs index fa1199d31281e..83eee0315e09b 100644 --- a/src/config/sink.rs +++ b/src/config/sink.rs @@ -4,11 +4,11 @@ use async_trait::async_trait; use dyn_clone::DynClone; use serde::Serialize; use vector_buffers::{BufferConfig, BufferType}; -use vector_config::{ +use vector_lib::configurable::attributes::CustomAttribute; +use vector_lib::configurable::schema::{SchemaGenerator, SchemaObject}; +use vector_lib::configurable::{ configurable_component, Configurable, GenerateError, Metadata, NamedComponent, }; -use vector_config_common::attributes::CustomAttribute; -use vector_config_common::schema::{SchemaGenerator, SchemaObject}; use vector_lib::{ config::{AcknowledgementsConfig, GlobalOptions, Input}, sink::VectorSink, @@ -33,7 +33,7 @@ impl Configurable for BoxedSink { } fn generate_schema(gen: &RefCell) -> Result { - vector_config::component::SinkDescription::generate_schemas(gen) + vector_lib::configurable::component::SinkDescription::generate_schemas(gen) } } diff --git a/src/config/source.rs b/src/config/source.rs index 2be18502e7d5b..b700a93f650e5 100644 --- a/src/config/source.rs +++ b/src/config/source.rs @@ -3,11 +3,11 @@ use std::collections::HashMap; use async_trait::async_trait; use dyn_clone::DynClone; -use vector_config::{ +use vector_lib::configurable::attributes::CustomAttribute; +use vector_lib::configurable::schema::{SchemaGenerator, SchemaObject}; +use vector_lib::configurable::{ configurable_component, Configurable, GenerateError, Metadata, NamedComponent, }; -use vector_config_common::attributes::CustomAttribute; -use vector_config_common::schema::{SchemaGenerator, SchemaObject}; use vector_lib::{ config::{ AcknowledgementsConfig, GlobalOptions, LogNamespace, SourceAcknowledgementsConfig, @@ -35,7 +35,7 @@ impl Configurable for BoxedSource { } fn generate_schema(gen: &RefCell) -> Result { - vector_config::component::SourceDescription::generate_schemas(gen) + vector_lib::configurable::component::SourceDescription::generate_schemas(gen) } } diff --git a/src/config/transform.rs b/src/config/transform.rs index 8d8c59352fd6a..ce5a63eeb9009 100644 --- a/src/config/transform.rs +++ b/src/config/transform.rs @@ -4,12 +4,12 @@ use std::collections::{HashMap, HashSet}; use async_trait::async_trait; use dyn_clone::DynClone; use serde::Serialize; -use vector_config::{ +use vector_lib::configurable::attributes::CustomAttribute; +use vector_lib::configurable::{ configurable_component, schema::{SchemaGenerator, SchemaObject}, Configurable, GenerateError, Metadata, NamedComponent, }; -use vector_config_common::attributes::CustomAttribute; use vector_lib::{ config::{GlobalOptions, Input, LogNamespace, TransformOutput}, schema, @@ -36,7 +36,7 @@ impl Configurable for BoxedTransform { } fn generate_schema(gen: &RefCell) -> Result { - vector_config::component::TransformDescription::generate_schemas(gen) + vector_lib::configurable::component::TransformDescription::generate_schemas(gen) } } diff --git a/src/config/unit_test/unit_test_components.rs b/src/config/unit_test/unit_test_components.rs index 3f1442598be77..f99d7d5380f32 100644 --- a/src/config/unit_test/unit_test_components.rs +++ b/src/config/unit_test/unit_test_components.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use futures::{stream, Sink, Stream}; use futures_util::{future, stream::BoxStream, FutureExt, StreamExt}; use tokio::sync::{oneshot, Mutex}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{DataType, Input, LogNamespace}, event::Event, diff --git a/src/docker.rs b/src/docker.rs index b66413be8e266..58e9c1819f7a8 100644 --- a/src/docker.rs +++ b/src/docker.rs @@ -11,7 +11,7 @@ use bollard::{ use futures::StreamExt; use http::uri::Uri; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; // From bollard source. const DEFAULT_TIMEOUT: u64 = 120; diff --git a/src/enrichment_tables/file.rs b/src/enrichment_tables/file.rs index 0401a118e4f5e..462d40f93c14e 100644 --- a/src/enrichment_tables/file.rs +++ b/src/enrichment_tables/file.rs @@ -10,7 +10,7 @@ use std::{ use bytes::Bytes; use enrichment::{Case, Condition, IndexHandle, Table}; use tracing::trace; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{conversion::Conversion, TimeZone}; use vrl::value::Value; diff --git a/src/enrichment_tables/geoip.rs b/src/enrichment_tables/geoip.rs index c9289c2c2198e..10847945b5e4b 100644 --- a/src/enrichment_tables/geoip.rs +++ b/src/enrichment_tables/geoip.rs @@ -14,7 +14,7 @@ use ordered_float::NotNan; use vrl::value::Value; use enrichment::{Case, Condition, IndexHandle, Table}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::config::{EnrichmentTableConfig, GenerateConfig}; diff --git a/src/enrichment_tables/mod.rs b/src/enrichment_tables/mod.rs index c95bf3bca242b..de1f514d24e12 100644 --- a/src/enrichment_tables/mod.rs +++ b/src/enrichment_tables/mod.rs @@ -1,7 +1,7 @@ //! Functionality to handle enrichment tables. pub use enrichment::{Condition, IndexHandle, Table}; use enum_dispatch::enum_dispatch; -use vector_config::{configurable_component, NamedComponent}; +use vector_lib::configurable::{configurable_component, NamedComponent}; use crate::config::{EnrichmentTableConfig, GlobalOptions}; diff --git a/src/gcp.rs b/src/gcp.rs index f2be1ef1ffa54..f6307116869c4 100644 --- a/src/gcp.rs +++ b/src/gcp.rs @@ -17,7 +17,7 @@ use once_cell::sync::Lazy; use smpl_jwt::Jwt; use snafu::{ResultExt, Snafu}; use tokio::{sync::watch, time::Instant}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::{config::ProxyConfig, http::HttpClient, http::HttpError}; diff --git a/src/generate.rs b/src/generate.rs index 41a22cad597cc..5adb8335e53c7 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -10,7 +10,7 @@ use colored::*; use indexmap::IndexMap; use serde::Serialize; use toml::{map::Map, Value}; -use vector_config::component::{ +use vector_lib::configurable::component::{ ExampleError, SinkDescription, SourceDescription, TransformDescription, }; use vector_lib::{buffers::BufferConfig, config::GlobalOptions, default_data_dir}; diff --git a/src/generate_schema.rs b/src/generate_schema.rs index ffe40c860020c..ab8e830d77c11 100644 --- a/src/generate_schema.rs +++ b/src/generate_schema.rs @@ -1,5 +1,5 @@ #![allow(missing_docs)] -use vector_config::schema::generate_root_schema; +use vector_lib::configurable::schema::generate_root_schema; use crate::config::ConfigBuilder; diff --git a/src/http.rs b/src/http.rs index ae3c7ae09300c..39ed37053a786 100644 --- a/src/http.rs +++ b/src/http.rs @@ -17,7 +17,7 @@ use hyper_proxy::ProxyConnector; use snafu::{ResultExt, Snafu}; use tower::Service; use tracing::Instrument; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::{ diff --git a/src/kafka.rs b/src/kafka.rs index 97776e0b014c9..cebf34bb23fb3 100644 --- a/src/kafka.rs +++ b/src/kafka.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use rdkafka::{consumer::ConsumerContext, ClientConfig, ClientContext, Statistics}; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::{ diff --git a/src/line_agg.rs b/src/line_agg.rs index 1eb3cfae96e3d..a1e391cba2d85 100644 --- a/src/line_agg.rs +++ b/src/line_agg.rs @@ -15,7 +15,7 @@ use futures::{Stream, StreamExt}; use pin_project::pin_project; use regex::bytes::Regex; use tokio_util::time::delay_queue::{DelayQueue, Key}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Mode of operation of the line aggregator. #[configurable_component] diff --git a/src/list.rs b/src/list.rs index bc65e0b137d5c..566b07215d486 100644 --- a/src/list.rs +++ b/src/list.rs @@ -2,7 +2,7 @@ use clap::Parser; use serde::Serialize; -use vector_config::component::{ +use vector_lib::configurable::component::{ EnrichmentTableDescription, SinkDescription, SourceDescription, TransformDescription, }; diff --git a/src/nats.rs b/src/nats.rs index edcac86fd68db..93a0a765ede55 100644 --- a/src/nats.rs +++ b/src/nats.rs @@ -1,6 +1,6 @@ use nkeys::error::Error as NKeysError; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::tls::TlsEnableableConfig; diff --git a/src/providers/http.rs b/src/providers/http.rs index 7fef82a429639..fd10c955513d4 100644 --- a/src/providers/http.rs +++ b/src/providers/http.rs @@ -5,7 +5,7 @@ use hyper::Body; use indexmap::IndexMap; use tokio::time; use url::Url; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ config::{self, provider::ProviderConfig, ProxyConfig}, diff --git a/src/providers/mod.rs b/src/providers/mod.rs index 2d693aad17f3d..1a7f8a1ab97e8 100644 --- a/src/providers/mod.rs +++ b/src/providers/mod.rs @@ -1,6 +1,6 @@ #![allow(missing_docs)] use enum_dispatch::enum_dispatch; -use vector_config::{configurable_component, NamedComponent}; +use vector_lib::configurable::{configurable_component, NamedComponent}; use crate::{ config::{ConfigBuilder, ProviderConfig}, diff --git a/src/secrets/exec.rs b/src/secrets/exec.rs index d983f0583a53a..0c192adffd583 100644 --- a/src/secrets/exec.rs +++ b/src/secrets/exec.rs @@ -6,7 +6,7 @@ use futures_util::StreamExt; use serde::{Deserialize, Serialize}; use tokio::{io::AsyncWriteExt, process::Command, time}; use tokio_util::codec; -use vector_config::{component::GenerateConfig, configurable_component}; +use vector_lib::configurable::{component::GenerateConfig, configurable_component}; use crate::{config::SecretBackend, signal}; diff --git a/src/secrets/mod.rs b/src/secrets/mod.rs index 14978705c3d23..83eea23c4ea42 100644 --- a/src/secrets/mod.rs +++ b/src/secrets/mod.rs @@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet}; use enum_dispatch::enum_dispatch; -use vector_config::{configurable_component, NamedComponent}; +use vector_lib::configurable::{configurable_component, NamedComponent}; use crate::{config::SecretBackend, signal}; diff --git a/src/secrets/test.rs b/src/secrets/test.rs index c6e059eade070..920fbe1ba2adc 100644 --- a/src/secrets/test.rs +++ b/src/secrets/test.rs @@ -1,6 +1,6 @@ use std::collections::{HashMap, HashSet}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{config::SecretBackend, signal}; diff --git a/src/serde.rs b/src/serde.rs index 284ecb6bc2fcf..04f80c51ab858 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -5,7 +5,7 @@ use codecs::{ }; use indexmap::map::IndexMap; use serde::{Deserialize, Serialize}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; pub use vector_lib::serde::{bool_or_struct, skip_serializing_if_default}; pub const fn default_true() -> bool { diff --git a/src/sinks/appsignal/config.rs b/src/sinks/appsignal/config.rs index 6a33f75968286..2fc0bdb4907b5 100644 --- a/src/sinks/appsignal/config.rs +++ b/src/sinks/appsignal/config.rs @@ -2,7 +2,7 @@ use futures::FutureExt; use http::{header::AUTHORIZATION, Request, Uri}; use hyper::Body; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::{ config::{proxy::ProxyConfig, AcknowledgementsConfig, DataType, Input}, diff --git a/src/sinks/appsignal/tests.rs b/src/sinks/appsignal/tests.rs index 10afdbcdd4b74..769fba9282518 100644 --- a/src/sinks/appsignal/tests.rs +++ b/src/sinks/appsignal/tests.rs @@ -1,6 +1,6 @@ use futures::{future::ready, stream}; use serde::Deserialize; -use vector_config::component::GenerateConfig; +use vector_lib::configurable::component::GenerateConfig; use vector_lib::event::{Event, LogEvent}; use crate::{ diff --git a/src/sinks/aws_cloudwatch_logs/config.rs b/src/sinks/aws_cloudwatch_logs/config.rs index f55c0cdd24c81..8827bd708fb12 100644 --- a/src/sinks/aws_cloudwatch_logs/config.rs +++ b/src/sinks/aws_cloudwatch_logs/config.rs @@ -3,7 +3,7 @@ use aws_smithy_types::retry::RetryConfig; use codecs::JsonSerializerConfig; use futures::FutureExt; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::schema; use vrl::value::Kind; diff --git a/src/sinks/aws_cloudwatch_metrics/mod.rs b/src/sinks/aws_cloudwatch_metrics/mod.rs index 86a77f78effbe..af81043a29bdb 100644 --- a/src/sinks/aws_cloudwatch_metrics/mod.rs +++ b/src/sinks/aws_cloudwatch_metrics/mod.rs @@ -14,7 +14,7 @@ use futures::{stream, FutureExt, SinkExt}; use futures_util::{future, future::BoxFuture}; use std::task::{Context, Poll}; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{sink::VectorSink, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ diff --git a/src/sinks/aws_kinesis/firehose/config.rs b/src/sinks/aws_kinesis/firehose/config.rs index ed601bf488bd1..4c5ccccfd5bdf 100644 --- a/src/sinks/aws_kinesis/firehose/config.rs +++ b/src/sinks/aws_kinesis/firehose/config.rs @@ -6,7 +6,7 @@ use aws_sdk_firehose::{ }; use futures::FutureExt; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::sinks::util::retries::RetryAction; use crate::{ diff --git a/src/sinks/aws_kinesis/streams/config.rs b/src/sinks/aws_kinesis/streams/config.rs index 8ace03b2b602b..3d975da3ab82d 100644 --- a/src/sinks/aws_kinesis/streams/config.rs +++ b/src/sinks/aws_kinesis/streams/config.rs @@ -5,7 +5,7 @@ use aws_sdk_kinesis::{ use futures::FutureExt; use lookup::lookup_v2::ConfigValuePath; use snafu::Snafu; -use vector_config::{component::GenerateConfig, configurable_component}; +use vector_lib::configurable::{component::GenerateConfig, configurable_component}; use crate::sinks::util::retries::RetryAction; use crate::{ diff --git a/src/sinks/aws_s3/config.rs b/src/sinks/aws_s3/config.rs index b31f9391afc17..80e2ecb552ea0 100644 --- a/src/sinks/aws_s3/config.rs +++ b/src/sinks/aws_s3/config.rs @@ -6,7 +6,7 @@ use codecs::{ TextSerializerConfig, }; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sink::VectorSink; use super::sink::S3RequestOptions; diff --git a/src/sinks/aws_s_s/config.rs b/src/sinks/aws_s_s/config.rs index aaf0a112d2f6b..702e4b0aae960 100644 --- a/src/sinks/aws_s_s/config.rs +++ b/src/sinks/aws_s_s/config.rs @@ -2,7 +2,7 @@ use std::convert::TryFrom; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ aws::AwsAuthentication, diff --git a/src/sinks/aws_s_s/sns/config.rs b/src/sinks/aws_s_s/sns/config.rs index a9ea5f283f579..8912cdaf0f21e 100644 --- a/src/sinks/aws_s_s/sns/config.rs +++ b/src/sinks/aws_s_s/sns/config.rs @@ -5,7 +5,7 @@ use crate::aws::RegionOrEndpoint; use crate::config::{ AcknowledgementsConfig, DataType, GenerateConfig, Input, ProxyConfig, SinkConfig, SinkContext, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use super::{ client::SnsMessagePublisher, message_deduplication_id, message_group_id, BaseSSSinkConfig, diff --git a/src/sinks/aws_s_s/sqs/config.rs b/src/sinks/aws_s_s/sqs/config.rs index 803e6e253e15d..32e2ce179b21c 100644 --- a/src/sinks/aws_s_s/sqs/config.rs +++ b/src/sinks/aws_s_s/sqs/config.rs @@ -5,7 +5,7 @@ use crate::aws::RegionOrEndpoint; use crate::config::{ AcknowledgementsConfig, DataType, GenerateConfig, Input, ProxyConfig, SinkConfig, SinkContext, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use super::{ client::SqsMessagePublisher, message_deduplication_id, message_group_id, BaseSSSinkConfig, diff --git a/src/sinks/axiom.rs b/src/sinks/axiom.rs index 7281e70246091..7b1c61a5f8047 100644 --- a/src/sinks/axiom.rs +++ b/src/sinks/axiom.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::{ diff --git a/src/sinks/azure_blob/config.rs b/src/sinks/azure_blob/config.rs index 01a7369dfdd81..5822dce243162 100644 --- a/src/sinks/azure_blob/config.rs +++ b/src/sinks/azure_blob/config.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use azure_storage_blobs::prelude::*; use codecs::{encoding::Framer, JsonSerializerConfig, NewlineDelimitedEncoderConfig}; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use super::request_builder::AzureBlobRequestOptions; diff --git a/src/sinks/azure_monitor_logs/config.rs b/src/sinks/azure_monitor_logs/config.rs index a5a57d2e5275c..1cd6b74414b19 100644 --- a/src/sinks/azure_monitor_logs/config.rs +++ b/src/sinks/azure_monitor_logs/config.rs @@ -1,7 +1,7 @@ use lookup::{lookup_v2::OptionalValuePath, OwnedValuePath}; use openssl::{base64, pkey}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::{config::log_schema, schema}; use vrl::value::Kind; diff --git a/src/sinks/blackhole/config.rs b/src/sinks/blackhole/config.rs index d2d69e75cc44f..80d42487a48ad 100644 --- a/src/sinks/blackhole/config.rs +++ b/src/sinks/blackhole/config.rs @@ -2,7 +2,7 @@ use std::time::Duration; use futures::{future, FutureExt}; use serde_with::serde_as; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ config::{AcknowledgementsConfig, GenerateConfig, Input, SinkConfig, SinkContext}, diff --git a/src/sinks/console/config.rs b/src/sinks/console/config.rs index 3aa1c46bb62af..7ae4a648b6017 100644 --- a/src/sinks/console/config.rs +++ b/src/sinks/console/config.rs @@ -4,7 +4,7 @@ use codecs::{ }; use futures::{future, FutureExt}; use tokio::io; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ codecs::{Encoder, EncodingConfigWithFraming, SinkType}, diff --git a/src/sinks/databend/compression.rs b/src/sinks/databend/compression.rs index f4e652e5b4217..da47748f44d88 100644 --- a/src/sinks/databend/compression.rs +++ b/src/sinks/databend/compression.rs @@ -1,4 +1,4 @@ -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Compression configuration. #[configurable_component] diff --git a/src/sinks/databend/config.rs b/src/sinks/databend/config.rs index 5029f7b650699..6b0caa4a0dc7d 100644 --- a/src/sinks/databend/config.rs +++ b/src/sinks/databend/config.rs @@ -3,7 +3,7 @@ use std::collections::BTreeMap; use codecs::encoding::{Framer, FramingConfig}; use futures::future::FutureExt; use tower::ServiceBuilder; -use vector_config::{component::GenerateConfig, configurable_component}; +use vector_lib::configurable::{component::GenerateConfig, configurable_component}; use vector_lib::tls::TlsSettings; use crate::{ diff --git a/src/sinks/databend/encoding.rs b/src/sinks/databend/encoding.rs index 300b85ed68019..f0fd102352514 100644 --- a/src/sinks/databend/encoding.rs +++ b/src/sinks/databend/encoding.rs @@ -1,5 +1,5 @@ use codecs::{encoding::SerializerConfig, CsvSerializerConfig, JsonSerializerConfig}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::codecs::{EncodingConfig, Transformer}; diff --git a/src/sinks/datadog/events/config.rs b/src/sinks/datadog/events/config.rs index 979c37822bf32..166881667db91 100644 --- a/src/sinks/datadog/events/config.rs +++ b/src/sinks/datadog/events/config.rs @@ -1,7 +1,7 @@ use indoc::indoc; use tower::ServiceBuilder; -use vector_config::configurable_component; use vector_lib::config::proxy::ProxyConfig; +use vector_lib::configurable::configurable_component; use vector_lib::schema; use vrl::value::Kind; diff --git a/src/sinks/datadog/logs/config.rs b/src/sinks/datadog/logs/config.rs index 6018d568d5543..e69181c38e65e 100644 --- a/src/sinks/datadog/logs/config.rs +++ b/src/sinks/datadog/logs/config.rs @@ -2,7 +2,7 @@ use std::{convert::TryFrom, sync::Arc}; use indoc::indoc; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{config::proxy::ProxyConfig, schema::meaning}; use vrl::value::Kind; diff --git a/src/sinks/datadog/metrics/config.rs b/src/sinks/datadog/metrics/config.rs index ae2852c9e3fa2..b774beccc2001 100644 --- a/src/sinks/datadog/metrics/config.rs +++ b/src/sinks/datadog/metrics/config.rs @@ -3,8 +3,8 @@ use std::sync::OnceLock; use http::Uri; use snafu::ResultExt; use tower::ServiceBuilder; -use vector_config::configurable_component; use vector_lib::config::proxy::ProxyConfig; +use vector_lib::configurable::configurable_component; use super::{ request_builder::DatadogMetricsRequestBuilder, diff --git a/src/sinks/datadog/mod.rs b/src/sinks/datadog/mod.rs index 3e49a8ce6f74e..0c08f6efcc613 100644 --- a/src/sinks/datadog/mod.rs +++ b/src/sinks/datadog/mod.rs @@ -2,7 +2,7 @@ use futures_util::FutureExt; use http::{Request, StatusCode, Uri}; use hyper::body::Body; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::{config::AcknowledgementsConfig, tls::TlsEnableableConfig}; diff --git a/src/sinks/datadog/traces/config.rs b/src/sinks/datadog/traces/config.rs index c5162d99ec0bc..b3fe500ba2311 100644 --- a/src/sinks/datadog/traces/config.rs +++ b/src/sinks/datadog/traces/config.rs @@ -5,8 +5,8 @@ use indoc::indoc; use snafu::ResultExt; use tokio::sync::oneshot::{channel, Sender}; use tower::ServiceBuilder; -use vector_config::configurable_component; use vector_lib::config::{proxy::ProxyConfig, AcknowledgementsConfig}; +use vector_lib::configurable::configurable_component; use super::{ apm_stats::{flush_apm_stats_thread, Aggregator}, diff --git a/src/sinks/elasticsearch/config.rs b/src/sinks/elasticsearch/config.rs index 5f175f8f57530..04fe7776ded0f 100644 --- a/src/sinks/elasticsearch/config.rs +++ b/src/sinks/elasticsearch/config.rs @@ -4,7 +4,7 @@ use std::{ }; use futures::{FutureExt, TryFutureExt}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ codecs::Transformer, diff --git a/src/sinks/elasticsearch/mod.rs b/src/sinks/elasticsearch/mod.rs index 687a79023594c..9b480aaec7c56 100644 --- a/src/sinks/elasticsearch/mod.rs +++ b/src/sinks/elasticsearch/mod.rs @@ -21,7 +21,7 @@ pub use config::*; pub use encoder::ElasticsearchEncoder; use http::{uri::InvalidUri, Request}; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use crate::{ diff --git a/src/sinks/file/mod.rs b/src/sinks/file/mod.rs index 9dadb7a9a6f31..0c17058f2008e 100644 --- a/src/sinks/file/mod.rs +++ b/src/sinks/file/mod.rs @@ -19,7 +19,7 @@ use tokio::{ io::AsyncWriteExt, }; use tokio_util::codec::Encoder as _; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ internal_event::{CountByteSize, EventsSent, InternalEventHandle as _, Output, Registered}, EstimatedJsonEncodedSizeOf, diff --git a/src/sinks/gcp/chronicle_unstructured.rs b/src/sinks/gcp/chronicle_unstructured.rs index 30e6277105e35..a0fe97cd9073b 100644 --- a/src/sinks/gcp/chronicle_unstructured.rs +++ b/src/sinks/gcp/chronicle_unstructured.rs @@ -12,7 +12,7 @@ use snafu::Snafu; use std::io; use tokio_util::codec::Encoder as _; use tower::{Service, ServiceBuilder}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vector_lib::{ config::{telemetry, AcknowledgementsConfig, Input}, diff --git a/src/sinks/gcp/cloud_storage.rs b/src/sinks/gcp/cloud_storage.rs index 1c2c0e0acea5e..e43607bbfdca9 100644 --- a/src/sinks/gcp/cloud_storage.rs +++ b/src/sinks/gcp/cloud_storage.rs @@ -10,7 +10,7 @@ use snafu::ResultExt; use snafu::Snafu; use tower::ServiceBuilder; use uuid::Uuid; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::event::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; diff --git a/src/sinks/gcp/mod.rs b/src/sinks/gcp/mod.rs index e28aa5826f889..26800790b79e2 100644 --- a/src/sinks/gcp/mod.rs +++ b/src/sinks/gcp/mod.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; pub mod bigquery; pub mod chronicle_unstructured; diff --git a/src/sinks/gcp/pubsub.rs b/src/sinks/gcp/pubsub.rs index 4660e32040a7d..29e8e43e69460 100644 --- a/src/sinks/gcp/pubsub.rs +++ b/src/sinks/gcp/pubsub.rs @@ -7,7 +7,7 @@ use indoc::indoc; use serde_json::{json, Value}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::Encoder as _; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ codecs::{Encoder, EncodingConfig, Transformer}, diff --git a/src/sinks/gcs_common/config.rs b/src/sinks/gcs_common/config.rs index 880d9f788b459..914d780c815b4 100644 --- a/src/sinks/gcs_common/config.rs +++ b/src/sinks/gcs_common/config.rs @@ -2,7 +2,7 @@ use futures::FutureExt; use http::{StatusCode, Uri}; use hyper::Body; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ gcp::{GcpAuthenticator, GcpError}, diff --git a/src/sinks/humio/logs.rs b/src/sinks/humio/logs.rs index a8f55d4c6c3d4..357a3bf1c9bf8 100644 --- a/src/sinks/humio/logs.rs +++ b/src/sinks/humio/logs.rs @@ -1,6 +1,6 @@ use codecs::JsonSerializerConfig; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use super::config_host_key; diff --git a/src/sinks/humio/metrics.rs b/src/sinks/humio/metrics.rs index e7a11424b4df3..1c197ef3aedd2 100644 --- a/src/sinks/humio/metrics.rs +++ b/src/sinks/humio/metrics.rs @@ -4,7 +4,7 @@ use futures::StreamExt; use futures_util::stream::BoxStream; use indoc::indoc; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::sink::StreamSink; diff --git a/src/sinks/influxdb/logs.rs b/src/sinks/influxdb/logs.rs index 30cbf6e1fd79a..322dce392ef7a 100644 --- a/src/sinks/influxdb/logs.rs +++ b/src/sinks/influxdb/logs.rs @@ -10,8 +10,8 @@ use vrl::value::Kind; use lookup::lookup_v2::OptionalValuePath; use lookup::PathPrefix; -use vector_config::configurable_component; use vector_lib::config::log_schema; +use vector_lib::configurable::configurable_component; use vector_lib::schema; use crate::{ diff --git a/src/sinks/influxdb/metrics.rs b/src/sinks/influxdb/metrics.rs index 0b8669a66c175..cf5e5c7bd2549 100644 --- a/src/sinks/influxdb/metrics.rs +++ b/src/sinks/influxdb/metrics.rs @@ -4,7 +4,7 @@ use bytes::{Bytes, BytesMut}; use futures::{future::BoxFuture, stream, SinkExt}; use serde::Serialize; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ event::metric::{MetricSketch, MetricTags, Quantile}, ByteSizeOf, EstimatedJsonEncodedSizeOf, diff --git a/src/sinks/influxdb/mod.rs b/src/sinks/influxdb/mod.rs index 9928d32797885..146bd83f6ffb8 100644 --- a/src/sinks/influxdb/mod.rs +++ b/src/sinks/influxdb/mod.rs @@ -9,7 +9,7 @@ use futures::FutureExt; use http::{StatusCode, Uri}; use snafu::{ResultExt, Snafu}; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::event::MetricTags; use vector_lib::sensitive_string::SensitiveString; diff --git a/src/sinks/kafka/config.rs b/src/sinks/kafka/config.rs index 487b572d73367..c5d5d3e02bc8b 100644 --- a/src/sinks/kafka/config.rs +++ b/src/sinks/kafka/config.rs @@ -5,7 +5,7 @@ use futures::FutureExt; use lookup::lookup_v2::ConfigTargetPath; use rdkafka::ClientConfig; use serde_with::serde_as; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vrl::value::Kind; use crate::{ diff --git a/src/sinks/mezmo.rs b/src/sinks/mezmo.rs index 599201d01702d..149b2c024c812 100644 --- a/src/sinks/mezmo.rs +++ b/src/sinks/mezmo.rs @@ -4,7 +4,7 @@ use bytes::Bytes; use futures::{FutureExt, SinkExt}; use http::{Request, StatusCode, Uri}; use serde_json::json; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vrl::event_path; use vrl::value::{Kind, Value}; diff --git a/src/sinks/papertrail.rs b/src/sinks/papertrail.rs index 557eb0c339c01..2e02d9c187672 100644 --- a/src/sinks/papertrail.rs +++ b/src/sinks/papertrail.rs @@ -1,6 +1,6 @@ use bytes::{BufMut, BytesMut}; use syslog::{Facility, Formatter3164, LogFormat, Severity}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vrl::value::Kind; use crate::{ diff --git a/src/sinks/prelude.rs b/src/sinks/prelude.rs index 5139bcb2f353d..44adc400cf72a 100644 --- a/src/sinks/prelude.rs +++ b/src/sinks/prelude.rs @@ -5,7 +5,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_config::configurable_component; +pub use vector_lib::configurable::configurable_component; pub use vector_lib::{ config::{telemetry, AcknowledgementsConfig, Input}, event::Value, diff --git a/src/sinks/prometheus/exporter.rs b/src/sinks/prometheus/exporter.rs index e047b53043c46..ecbcf6537b0c3 100644 --- a/src/sinks/prometheus/exporter.rs +++ b/src/sinks/prometheus/exporter.rs @@ -20,7 +20,7 @@ use serde_with::serde_as; use snafu::Snafu; use stream_cancel::{Trigger, Tripwire}; use tracing::{Instrument, Span}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ internal_event::{ ByteSize, BytesSent, CountByteSize, EventsSent, InternalEventHandle as _, Output, Protocol, diff --git a/src/sinks/prometheus/mod.rs b/src/sinks/prometheus/mod.rs index 1e8508ac935d1..2e2ddc0e00694 100644 --- a/src/sinks/prometheus/mod.rs +++ b/src/sinks/prometheus/mod.rs @@ -6,7 +6,7 @@ mod collector; pub(crate) mod exporter; pub(crate) mod remote_write; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Authentication strategies. #[configurable_component] diff --git a/src/sinks/pulsar/tests.rs b/src/sinks/pulsar/tests.rs index 5dae4bb67846c..1fbee5cba0eec 100644 --- a/src/sinks/pulsar/tests.rs +++ b/src/sinks/pulsar/tests.rs @@ -2,7 +2,7 @@ use crate::event::Event; use crate::sinks::pulsar::config::PulsarSinkConfig; use lookup::lookup_v2::OptionalTargetPath; use std::collections::BTreeMap; -use vector_config::component::GenerateConfig; +use vector_lib::configurable::component::GenerateConfig; use vrl::value::Value; use bytes::Bytes; diff --git a/src/sinks/s3_common/config.rs b/src/sinks/s3_common/config.rs index 115d4b7e9596b..7abdf9f2175e1 100644 --- a/src/sinks/s3_common/config.rs +++ b/src/sinks/s3_common/config.rs @@ -9,7 +9,7 @@ use aws_smithy_client::SdkError; use futures::FutureExt; use http::StatusCode; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use super::service::{S3Response, S3Service}; use crate::{ diff --git a/src/sinks/sematext/logs.rs b/src/sinks/sematext/logs.rs index 4c791b01c0568..8272e425e152c 100644 --- a/src/sinks/sematext/logs.rs +++ b/src/sinks/sematext/logs.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use futures::stream::{BoxStream, StreamExt}; use indoc::indoc; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vrl::event_path; diff --git a/src/sinks/sematext/metrics.rs b/src/sinks/sematext/metrics.rs index 2ff9945d3260c..982c1393b2919 100644 --- a/src/sinks/sematext/metrics.rs +++ b/src/sinks/sematext/metrics.rs @@ -6,7 +6,7 @@ use http::{StatusCode, Uri}; use hyper::{Body, Request}; use indoc::indoc; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; diff --git a/src/sinks/sematext/mod.rs b/src/sinks/sematext/mod.rs index d7002d5ddaacc..b730aad7586fc 100644 --- a/src/sinks/sematext/mod.rs +++ b/src/sinks/sematext/mod.rs @@ -3,7 +3,7 @@ pub mod metrics; pub use self::{logs::SematextLogsConfig, metrics::SematextMetricsConfig}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// The Sematext region to send data to. #[configurable_component] diff --git a/src/sinks/socket.rs b/src/sinks/socket.rs index c6947f7658512..0e63bc1613cb9 100644 --- a/src/sinks/socket.rs +++ b/src/sinks/socket.rs @@ -2,7 +2,7 @@ use codecs::{ encoding::{Framer, FramingConfig}, TextSerializerConfig, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; #[cfg(unix)] use crate::sinks::util::unix::UnixSinkConfig; diff --git a/src/sinks/splunk_hec/common/acknowledgements.rs b/src/sinks/splunk_hec/common/acknowledgements.rs index 7ca8ade82782d..89ca0a93ba267 100644 --- a/src/sinks/splunk_hec/common/acknowledgements.rs +++ b/src/sinks/splunk_hec/common/acknowledgements.rs @@ -8,7 +8,7 @@ use std::{ use hyper::Body; use serde::{Deserialize, Serialize}; use tokio::sync::{mpsc::Receiver, oneshot::Sender}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::event::EventStatus; use super::service::{HttpRequestBuilder, MetadataFields}; diff --git a/src/sinks/splunk_hec/common/mod.rs b/src/sinks/splunk_hec/common/mod.rs index 968d234d2d45e..042c2b7a21772 100644 --- a/src/sinks/splunk_hec/common/mod.rs +++ b/src/sinks/splunk_hec/common/mod.rs @@ -5,7 +5,7 @@ pub mod service; pub mod util; pub use util::*; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; pub(super) const SOURCE_FIELD: &str = "source"; pub(super) const SOURCETYPE_FIELD: &str = "sourcetype"; diff --git a/src/sinks/splunk_hec/logs/config.rs b/src/sinks/splunk_hec/logs/config.rs index 0c5eb42d26ee3..f4bcdd90b92a4 100644 --- a/src/sinks/splunk_hec/logs/config.rs +++ b/src/sinks/splunk_hec/logs/config.rs @@ -4,7 +4,7 @@ use codecs::TextSerializerConfig; use futures_util::FutureExt; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::sink::VectorSink; diff --git a/src/sinks/splunk_hec/metrics/config.rs b/src/sinks/splunk_hec/metrics/config.rs index a8636da1487a5..832c8da762421 100644 --- a/src/sinks/splunk_hec/metrics/config.rs +++ b/src/sinks/splunk_hec/metrics/config.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use futures_util::FutureExt; use lookup::lookup_v2::OptionalValuePath; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vector_lib::sink::VectorSink; diff --git a/src/sinks/statsd/config.rs b/src/sinks/statsd/config.rs index 3cfaf5e7d0d20..48f3cd5fb3d00 100644 --- a/src/sinks/statsd/config.rs +++ b/src/sinks/statsd/config.rs @@ -1,7 +1,7 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use async_trait::async_trait; -use vector_config::{component::GenerateConfig, configurable_component}; +use vector_lib::configurable::{component::GenerateConfig, configurable_component}; use vector_lib::internal_event::Protocol; use vector_lib::{ config::{AcknowledgementsConfig, Input}, diff --git a/src/sinks/util/adaptive_concurrency/mod.rs b/src/sinks/util/adaptive_concurrency/mod.rs index ab5afd6c53f87..dedbc8d1221b1 100644 --- a/src/sinks/util/adaptive_concurrency/mod.rs +++ b/src/sinks/util/adaptive_concurrency/mod.rs @@ -15,7 +15,7 @@ pub(super) const MAX_CONCURRENCY: usize = 200; pub(crate) use layer::AdaptiveConcurrencyLimitLayer; pub(crate) use service::AdaptiveConcurrencyLimit; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; fn instant_now() -> std::time::Instant { tokio::time::Instant::now().into() diff --git a/src/sinks/util/adaptive_concurrency/tests.rs b/src/sinks/util/adaptive_concurrency/tests.rs index 6c56b63eaff4f..0aa059fd11a81 100644 --- a/src/sinks/util/adaptive_concurrency/tests.rs +++ b/src/sinks/util/adaptive_concurrency/tests.rs @@ -25,7 +25,7 @@ use serde::Deserialize; use snafu::Snafu; use tokio::time::{self, sleep, Duration, Instant}; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::json_size::JsonSize; use super::controller::ControllerStatistics; diff --git a/src/sinks/util/batch.rs b/src/sinks/util/batch.rs index be9ac6b21c220..30dfdd4b181b8 100644 --- a/src/sinks/util/batch.rs +++ b/src/sinks/util/batch.rs @@ -3,7 +3,7 @@ use std::{marker::PhantomData, num::NonZeroUsize, time::Duration}; use derivative::Derivative; use serde_with::serde_as; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::json_size::JsonSize; use vector_stream::BatcherSettings; diff --git a/src/sinks/util/buffer/compression.rs b/src/sinks/util/buffer/compression.rs index 943232ad25be5..88f8b931c2009 100644 --- a/src/sinks/util/buffer/compression.rs +++ b/src/sinks/util/buffer/compression.rs @@ -3,7 +3,8 @@ use std::{cell::RefCell, collections::BTreeSet, fmt}; use indexmap::IndexMap; use serde::{de, ser}; use serde_json::Value; -use vector_config::{ +use vector_lib::configurable::attributes::CustomAttribute; +use vector_lib::configurable::{ schema::{ apply_base_metadata, generate_const_string_schema, generate_enum_schema, generate_one_of_schema, generate_struct_schema, get_or_generate_schema, SchemaGenerator, @@ -11,7 +12,6 @@ use vector_config::{ }, Configurable, GenerateError, Metadata, ToValue, }; -use vector_config_common::attributes::CustomAttribute; use crate::sinks::util::zstd::ZstdCompressionLevel; diff --git a/src/sinks/util/http.rs b/src/sinks/util/http.rs index 499f7640f497c..f4461633948ba 100644 --- a/src/sinks/util/http.rs +++ b/src/sinks/util/http.rs @@ -19,7 +19,7 @@ use pin_project::pin_project; use snafu::{ResultExt, Snafu}; use tower::{Service, ServiceBuilder}; use tower_http::decompression::DecompressionLayer; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_stream::batcher::limiter::ItemBatchSize; diff --git a/src/sinks/util/service.rs b/src/sinks/util/service.rs index 18b14e5a74197..0b01cfabfa353 100644 --- a/src/sinks/util/service.rs +++ b/src/sinks/util/service.rs @@ -12,7 +12,7 @@ use tower::{ timeout::Timeout, Service, ServiceBuilder, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; pub use crate::sinks::util::service::{ concurrency::{concurrency_is_adaptive, Concurrency}, diff --git a/src/sinks/util/service/concurrency.rs b/src/sinks/util/service/concurrency.rs index b8f1bbe6e3fef..cc77ef0338fc0 100644 --- a/src/sinks/util/service/concurrency.rs +++ b/src/sinks/util/service/concurrency.rs @@ -2,14 +2,14 @@ use std::{cell::RefCell, fmt}; use serde::Serializer; use serde_json::Value; -use vector_config::{ +use vector_lib::configurable::attributes::CustomAttribute; +use vector_lib::configurable::{ schema::{ apply_base_metadata, generate_const_string_schema, generate_number_schema, generate_one_of_schema, SchemaGenerator, SchemaObject, }, Configurable, GenerateError, Metadata, ToValue, }; -use vector_config_common::attributes::CustomAttribute; use serde::{ de::{self, Unexpected, Visitor}, diff --git a/src/sinks/util/service/health.rs b/src/sinks/util/service/health.rs index 6fdb202afd846..a9b5e2b98abc0 100644 --- a/src/sinks/util/service/health.rs +++ b/src/sinks/util/service/health.rs @@ -15,7 +15,7 @@ use serde_with::serde_as; use stream_cancel::{Trigger, Tripwire}; use tokio::time::{sleep, Duration}; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ emit, diff --git a/src/sinks/util/service/net/mod.rs b/src/sinks/util/service/net/mod.rs index 5dc7c34c93e6e..3ad532f747994 100644 --- a/src/sinks/util/service/net/mod.rs +++ b/src/sinks/util/service/net/mod.rs @@ -44,7 +44,7 @@ use tokio::{ time::sleep, }; use tower::Service; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::tls::{MaybeTlsStream, TlsError}; /// Hostname and port tuple. diff --git a/src/sinks/util/service/net/tcp.rs b/src/sinks/util/service/net/tcp.rs index f90c28d673a1a..d85d84fce593b 100644 --- a/src/sinks/util/service/net/tcp.rs +++ b/src/sinks/util/service/net/tcp.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use snafu::ResultExt; use tokio::net::TcpStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ tcp::TcpKeepaliveConfig, tls::{MaybeTlsSettings, MaybeTlsStream, TlsEnableableConfig}, diff --git a/src/sinks/util/service/net/udp.rs b/src/sinks/util/service/net/udp.rs index 86a4ceaab7f53..c4cb9c2fa1ff2 100644 --- a/src/sinks/util/service/net/udp.rs +++ b/src/sinks/util/service/net/udp.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use snafu::ResultExt; use tokio::net::UdpSocket; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{dns, net}; diff --git a/src/sinks/util/service/net/unix.rs b/src/sinks/util/service/net/unix.rs index 5bd1e4219d7a8..f0655015f06fe 100644 --- a/src/sinks/util/service/net/unix.rs +++ b/src/sinks/util/service/net/unix.rs @@ -10,7 +10,7 @@ use tokio::{ net::{UnixDatagram, UnixStream}, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::net; diff --git a/src/sinks/util/tcp.rs b/src/sinks/util/tcp.rs index 417a884a6902c..505cbb93a6ad5 100644 --- a/src/sinks/util/tcp.rs +++ b/src/sinks/util/tcp.rs @@ -17,7 +17,7 @@ use tokio::{ time::sleep, }; use tokio_util::codec::Encoder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::json_size::JsonSize; use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; diff --git a/src/sinks/util/udp.rs b/src/sinks/util/udp.rs index 87227c3ce6b89..65396fc9d1935 100644 --- a/src/sinks/util/udp.rs +++ b/src/sinks/util/udp.rs @@ -10,7 +10,7 @@ use futures::{stream::BoxStream, FutureExt, StreamExt}; use snafu::{ResultExt, Snafu}; use tokio::{net::UdpSocket, time::sleep}; use tokio_util::codec::Encoder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ByteSize, BytesSent, InternalEventHandle, Protocol, Registered}; use vector_lib::EstimatedJsonEncodedSizeOf; diff --git a/src/sinks/util/unix.rs b/src/sinks/util/unix.rs index d30d0c2a0a203..510615f23234b 100644 --- a/src/sinks/util/unix.rs +++ b/src/sinks/util/unix.rs @@ -6,7 +6,7 @@ use futures::{stream::BoxStream, SinkExt, StreamExt}; use snafu::{ResultExt, Snafu}; use tokio::{net::UnixStream, time::sleep}; use tokio_util::codec::Encoder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::json_size::JsonSize; use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; diff --git a/src/sinks/util/uri.rs b/src/sinks/util/uri.rs index 34f82f03a8326..ce61414c06539 100644 --- a/src/sinks/util/uri.rs +++ b/src/sinks/util/uri.rs @@ -2,7 +2,7 @@ use std::{fmt, str::FromStr}; use http::uri::{Authority, PathAndQuery, Scheme, Uri}; use percent_encoding::percent_decode_str; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::http::Auth; diff --git a/src/sinks/vector/config.rs b/src/sinks/vector/config.rs index b0e2b6c5a8e6f..095eda4a4503c 100644 --- a/src/sinks/vector/config.rs +++ b/src/sinks/vector/config.rs @@ -4,7 +4,7 @@ use hyper_openssl::HttpsConnector; use hyper_proxy::ProxyConnector; use tonic::body::BoxBody; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use super::{ service::{VectorResponse, VectorService}, diff --git a/src/sinks/vector/mod.rs b/src/sinks/vector/mod.rs index 78b170f38b429..1ed61448e2a25 100644 --- a/src/sinks/vector/mod.rs +++ b/src/sinks/vector/mod.rs @@ -1,6 +1,6 @@ use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; mod config; mod service; diff --git a/src/sinks/webhdfs/config.rs b/src/sinks/webhdfs/config.rs index df0d03d9e03ec..1c638837efe87 100644 --- a/src/sinks/webhdfs/config.rs +++ b/src/sinks/webhdfs/config.rs @@ -1,7 +1,7 @@ use codecs::{encoding::Framer, JsonSerializerConfig, NewlineDelimitedEncoderConfig}; use opendal::{layers::LoggingLayer, services::Webhdfs, Operator}; use tower::ServiceBuilder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{AcknowledgementsConfig, DataType, Input}, sink::VectorSink, diff --git a/src/sinks/websocket/config.rs b/src/sinks/websocket/config.rs index 76a3391ff0eac..31f3ecc5a4b53 100644 --- a/src/sinks/websocket/config.rs +++ b/src/sinks/websocket/config.rs @@ -2,7 +2,7 @@ use std::num::NonZeroU64; use codecs::JsonSerializerConfig; use snafu::ResultExt; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::{ codecs::EncodingConfig, diff --git a/src/sources/amqp.rs b/src/sources/amqp.rs index 68333d0f47b98..7e3528b5d66d1 100644 --- a/src/sources/amqp.rs +++ b/src/sources/amqp.rs @@ -24,7 +24,7 @@ use lookup::{lookup_v2::OptionalValuePath, metadata_path, owned_value_path, path use snafu::Snafu; use std::{io::Cursor, pin::Pin}; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{log_schema, LegacyKey, LogNamespace, SourceAcknowledgementsConfig}, event::Event, diff --git a/src/sources/apache_metrics/mod.rs b/src/sources/apache_metrics/mod.rs index d44820e70d2a8..78692c03e7e97 100644 --- a/src/sources/apache_metrics/mod.rs +++ b/src/sources/apache_metrics/mod.rs @@ -10,7 +10,7 @@ use hyper::{Body, Request}; use serde_with::serde_as; use snafu::ResultExt; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{metric_tags, EstimatedJsonEncodedSizeOf}; use crate::{ diff --git a/src/sources/aws_ecs_metrics/mod.rs b/src/sources/aws_ecs_metrics/mod.rs index c9dc51073132c..15c9e6d48a790 100644 --- a/src/sources/aws_ecs_metrics/mod.rs +++ b/src/sources/aws_ecs_metrics/mod.rs @@ -5,7 +5,7 @@ use hyper::{Body, Client, Request}; use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; use vector_lib::{config::LogNamespace, EstimatedJsonEncodedSizeOf}; diff --git a/src/sources/aws_kinesis_firehose/mod.rs b/src/sources/aws_kinesis_firehose/mod.rs index a7df07b4bafe3..b3116c2825b97 100644 --- a/src/sources/aws_kinesis_firehose/mod.rs +++ b/src/sources/aws_kinesis_firehose/mod.rs @@ -4,8 +4,8 @@ use codecs::decoding::{DeserializerConfig, FramingConfig}; use futures::FutureExt; use lookup::owned_value_path; use tracing::Span; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use vrl::value::Kind; use warp::Filter; diff --git a/src/sources/aws_s3/mod.rs b/src/sources/aws_s3/mod.rs index d0dd76f3ee684..4fc2abe3d753a 100644 --- a/src/sources/aws_s3/mod.rs +++ b/src/sources/aws_s3/mod.rs @@ -8,8 +8,8 @@ use futures::{stream, stream::StreamExt, TryStreamExt}; use lookup::owned_value_path; use snafu::Snafu; use tokio_util::io::StreamReader; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::value::{kind::Collection, Kind}; use super::util::MultilineConfig; diff --git a/src/sources/aws_s3/sqs.rs b/src/sources/aws_s3/sqs.rs index 2960a6fecfff9..0fc66ea6b1921 100644 --- a/src/sources/aws_s3/sqs.rs +++ b/src/sources/aws_s3/sqs.rs @@ -22,7 +22,7 @@ use snafu::{ResultExt, Snafu}; use tokio::{pin, select}; use tokio_util::codec::FramedRead; use tracing::Instrument; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/aws_sqs/config.rs b/src/sources/aws_sqs/config.rs index a9cd3b31f613b..e3e43a74692aa 100644 --- a/src/sources/aws_sqs/config.rs +++ b/src/sources/aws_sqs/config.rs @@ -2,8 +2,8 @@ use std::num::NonZeroUsize; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::owned_value_path; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::value::Kind; use crate::aws::create_client; diff --git a/src/sources/datadog_agent/mod.rs b/src/sources/datadog_agent/mod.rs index 1001c5fe040a6..76686629276d1 100644 --- a/src/sources/datadog_agent/mod.rs +++ b/src/sources/datadog_agent/mod.rs @@ -30,8 +30,8 @@ use regex::Regex; use serde::{Deserialize, Serialize}; use snafu::Snafu; use tracing::Span; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::event::{BatchNotifier, BatchStatus}; use vector_lib::internal_event::{EventsReceived, Registered}; use vrl::path::OwnedTargetPath; diff --git a/src/sources/demo_logs.rs b/src/sources/demo_logs.rs index b98bbd755edd6..3f464b137fb6f 100644 --- a/src/sources/demo_logs.rs +++ b/src/sources/demo_logs.rs @@ -12,7 +12,7 @@ use snafu::Snafu; use std::task::Poll; use tokio::time::{self, Duration}; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, }; diff --git a/src/sources/dnstap/mod.rs b/src/sources/dnstap/mod.rs index 97cc464853bbc..34c30ee675201 100644 --- a/src/sources/dnstap/mod.rs +++ b/src/sources/dnstap/mod.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use base64::prelude::{Engine as _, BASE64_STANDARD}; use bytes::Bytes; use lookup::{owned_value_path, path, OwnedValuePath}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/docker_logs/mod.rs b/src/sources/docker_logs/mod.rs index a2587b8122ade..8ebea56ec6f0b 100644 --- a/src/sources/docker_logs/mod.rs +++ b/src/sources/docker_logs/mod.rs @@ -20,8 +20,8 @@ use once_cell::sync::Lazy; use serde_with::serde_as; use tokio::sync::mpsc; use tracing_futures::Instrument; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/eventstoredb_metrics/mod.rs b/src/sources/eventstoredb_metrics/mod.rs index 84bc793767a23..9f06ace61d50b 100644 --- a/src/sources/eventstoredb_metrics/mod.rs +++ b/src/sources/eventstoredb_metrics/mod.rs @@ -5,8 +5,8 @@ use http::Uri; use hyper::{Body, Request}; use serde_with::serde_as; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, }; diff --git a/src/sources/exec/mod.rs b/src/sources/exec/mod.rs index fd3ecab3cefe3..924ad5db9ca33 100644 --- a/src/sources/exec/mod.rs +++ b/src/sources/exec/mod.rs @@ -21,7 +21,7 @@ use tokio::{ }; use tokio_stream::wrappers::IntervalStream; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; use vector_lib::{config::LegacyKey, EstimatedJsonEncodedSizeOf}; use vrl::path::OwnedValuePath; diff --git a/src/sources/file.rs b/src/sources/file.rs index 1e1b38d453970..cec4afafee781 100644 --- a/src/sources/file.rs +++ b/src/sources/file.rs @@ -16,7 +16,7 @@ use serde_with::serde_as; use snafu::{ResultExt, Snafu}; use tokio::{sync::oneshot, task::spawn_blocking}; use tracing::{Instrument, Span}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::finalizer::OrderedFinalizer; use vector_lib::{ config::{LegacyKey, LogNamespace}, diff --git a/src/sources/file_descriptors/file_descriptor.rs b/src/sources/file_descriptors/file_descriptor.rs index 55767441d7e42..44cb42b006d86 100644 --- a/src/sources/file_descriptors/file_descriptor.rs +++ b/src/sources/file_descriptors/file_descriptor.rs @@ -4,8 +4,8 @@ use super::{outputs, FileDescriptorConfig}; use codecs::decoding::{DeserializerConfig, FramingConfig}; use indoc::indoc; use lookup::lookup_v2::OptionalValuePath; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use crate::{ config::{GenerateConfig, Resource, SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/file_descriptors/mod.rs b/src/sources/file_descriptors/mod.rs index 125cf69e16ede..f48732fc22658 100644 --- a/src/sources/file_descriptors/mod.rs +++ b/src/sources/file_descriptors/mod.rs @@ -10,7 +10,7 @@ use codecs::{ use futures::{channel::mpsc, executor, SinkExt, StreamExt}; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path, OwnedValuePath}; use tokio_util::{codec::FramedRead, io::StreamReader}; -use vector_config::NamedComponent; +use vector_lib::configurable::NamedComponent; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, }; diff --git a/src/sources/file_descriptors/stdin.rs b/src/sources/file_descriptors/stdin.rs index bf0497942b2de..d538d63c32750 100644 --- a/src/sources/file_descriptors/stdin.rs +++ b/src/sources/file_descriptors/stdin.rs @@ -2,8 +2,8 @@ use std::io; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::lookup_v2::OptionalValuePath; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use crate::{ config::{Resource, SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/fluent/mod.rs b/src/sources/fluent/mod.rs index 8dd1f23c6b496..1bb61b0e1624c 100644 --- a/src/sources/fluent/mod.rs +++ b/src/sources/fluent/mod.rs @@ -14,8 +14,8 @@ use rmp_serde::{decode, Deserializer, Serializer}; use serde::{Deserialize, Serialize}; use smallvec::{smallvec, SmallVec}; use tokio_util::codec::Decoder; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::schema::Definition; use vrl::value::kind::Collection; use vrl::value::{Kind, Value}; diff --git a/src/sources/gcp_pubsub.rs b/src/sources/gcp_pubsub.rs index 2dc1b3069fc46..5f61534545bb7 100644 --- a/src/sources/gcp_pubsub.rs +++ b/src/sources/gcp_pubsub.rs @@ -20,8 +20,8 @@ use tonic::{ transport::{Certificate, ClientTlsConfig, Endpoint, Identity}, Code, Request, Status, }; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, EventsReceived, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/heroku_logs.rs b/src/sources/heroku_logs.rs index 1664f887ef9fe..3cc33314f3424 100644 --- a/src/sources/heroku_logs.rs +++ b/src/sources/heroku_logs.rs @@ -17,7 +17,7 @@ use tokio_util::codec::Decoder as _; use vrl::value::{kind::Collection, Kind}; use warp::http::{HeaderMap, StatusCode}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, diff --git a/src/sources/host_metrics/disk.rs b/src/sources/host_metrics/disk.rs index 5c91cbb1faedf..a24d20cf8b241 100644 --- a/src/sources/host_metrics/disk.rs +++ b/src/sources/host_metrics/disk.rs @@ -1,7 +1,7 @@ use crate::internal_events::HostMetricsScrapeDetailError; use futures::StreamExt; use heim::units::information::byte; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::metric_tags; use super::{default_all_devices, example_devices, filter_result, FilterList, HostMetrics}; diff --git a/src/sources/host_metrics/filesystem.rs b/src/sources/host_metrics/filesystem.rs index 3c066f7e07992..d01094ffb3951 100644 --- a/src/sources/host_metrics/filesystem.rs +++ b/src/sources/host_metrics/filesystem.rs @@ -2,7 +2,7 @@ use futures::StreamExt; use heim::units::information::byte; #[cfg(not(windows))] use heim::units::ratio::ratio; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::metric_tags; use crate::internal_events::{HostMetricsScrapeDetailError, HostMetricsScrapeFilesystemError}; diff --git a/src/sources/host_metrics/mod.rs b/src/sources/host_metrics/mod.rs index 0894e1aa9222b..31bf36e584573 100644 --- a/src/sources/host_metrics/mod.rs +++ b/src/sources/host_metrics/mod.rs @@ -12,8 +12,8 @@ use heim::units::time::second; use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/host_metrics/network.rs b/src/sources/host_metrics/network.rs index 158d70fb306d2..d97559ad3f9ab 100644 --- a/src/sources/host_metrics/network.rs +++ b/src/sources/host_metrics/network.rs @@ -4,7 +4,7 @@ use heim::net::os::linux::IoCountersExt; #[cfg(windows)] use heim::net::os::windows::IoCountersExt; use heim::units::information::byte; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::metric_tags; use crate::internal_events::HostMetricsScrapeDetailError; diff --git a/src/sources/http_client/client.rs b/src/sources/http_client/client.rs index 98f805e990e6a..d1fa5c1bb035c 100644 --- a/src/sources/http_client/client.rs +++ b/src/sources/http_client/client.rs @@ -32,7 +32,7 @@ use codecs::{ decoding::{DeserializerConfig, FramingConfig}, StreamDecodingError, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{log_schema, LogNamespace, SourceOutput}, event::Event, diff --git a/src/sources/http_server.rs b/src/sources/http_server.rs index a59e6a834cb3b..bfca943edbc58 100644 --- a/src/sources/http_server.rs +++ b/src/sources/http_server.rs @@ -14,7 +14,7 @@ use codecs::{ NewlineDelimitedDecoderConfig, }; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{DataType, LegacyKey, LogNamespace}, schema::Definition, diff --git a/src/sources/internal_logs.rs b/src/sources/internal_logs.rs index dcb697e7ad726..92d4f9702679a 100644 --- a/src/sources/internal_logs.rs +++ b/src/sources/internal_logs.rs @@ -3,8 +3,8 @@ use codecs::BytesDeserializerConfig; use futures::{stream, StreamExt}; use lookup::lookup_v2::OptionalValuePath; use lookup::{owned_value_path, path, OwnedValuePath}; -use vector_config::configurable_component; use vector_lib::config::log_schema; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, diff --git a/src/sources/internal_metrics.rs b/src/sources/internal_metrics.rs index d17a28d042777..be1c93fc2a99c 100644 --- a/src/sources/internal_metrics.rs +++ b/src/sources/internal_metrics.rs @@ -5,7 +5,7 @@ use lookup::lookup_v2::OptionalValuePath; use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; use vector_lib::{config::LogNamespace, ByteSizeOf, EstimatedJsonEncodedSizeOf}; diff --git a/src/sources/journald.rs b/src/sources/journald.rs index 3e59a5b472888..47ca086a9ccee 100644 --- a/src/sources/journald.rs +++ b/src/sources/journald.rs @@ -28,7 +28,7 @@ use tokio::{ time::sleep, }; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, diff --git a/src/sources/kafka.rs b/src/sources/kafka.rs index 49d57878733ac..a7a3f3dc022f0 100644 --- a/src/sources/kafka.rs +++ b/src/sources/kafka.rs @@ -42,7 +42,7 @@ use tokio::{ }; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::finalizer::OrderedFinalizer; use vector_lib::{ config::{LegacyKey, LogNamespace}, diff --git a/src/sources/kubernetes_logs/mod.rs b/src/sources/kubernetes_logs/mod.rs index a482b6115bcc6..49c3e81053c89 100644 --- a/src/sources/kubernetes_logs/mod.rs +++ b/src/sources/kubernetes_logs/mod.rs @@ -26,7 +26,7 @@ use kube::{ use lifecycle::Lifecycle; use lookup::{lookup_v2::OptionalTargetPath, owned_value_path, path, OwnedTargetPath}; use serde_with::serde_as; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{config::LegacyKey, config::LogNamespace, EstimatedJsonEncodedSizeOf}; use vector_lib::{ internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}, diff --git a/src/sources/kubernetes_logs/namespace_metadata_annotator.rs b/src/sources/kubernetes_logs/namespace_metadata_annotator.rs index 084dfa0593344..1ea034033183b 100644 --- a/src/sources/kubernetes_logs/namespace_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/namespace_metadata_annotator.rs @@ -6,8 +6,8 @@ use k8s_openapi::{api::core::v1::Namespace, apimachinery::pkg::apis::meta::v1::O use kube::runtime::reflector::{store::Store, ObjectRef}; use lookup::lookup_v2::OptionalTargetPath; use lookup::{lookup_v2::ValuePath, owned_value_path, path, OwnedTargetPath}; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use crate::event::{Event, LogEvent}; diff --git a/src/sources/kubernetes_logs/node_metadata_annotator.rs b/src/sources/kubernetes_logs/node_metadata_annotator.rs index 7e13cf5129ddd..25260cb321620 100644 --- a/src/sources/kubernetes_logs/node_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/node_metadata_annotator.rs @@ -7,8 +7,8 @@ use k8s_openapi::{api::core::v1::Node, apimachinery::pkg::apis::meta::v1::Object use kube::runtime::reflector::{store::Store, ObjectRef}; use lookup::lookup_v2::OptionalTargetPath; use lookup::{lookup_v2::ValuePath, owned_value_path, path, OwnedTargetPath}; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use super::Config; diff --git a/src/sources/kubernetes_logs/pod_metadata_annotator.rs b/src/sources/kubernetes_logs/pod_metadata_annotator.rs index 7cbdeefd708b6..933e5887489b2 100644 --- a/src/sources/kubernetes_logs/pod_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/pod_metadata_annotator.rs @@ -11,8 +11,8 @@ use lookup::{ lookup_v2::{OptionalTargetPath, ValuePath}, owned_value_path, path, OwnedTargetPath, }; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use super::{ path_helpers::{parse_log_file_path, LogFileInfo}, diff --git a/src/sources/logstash.rs b/src/sources/logstash.rs index 59739ef5b0681..d130cfee4ccfd 100644 --- a/src/sources/logstash.rs +++ b/src/sources/logstash.rs @@ -13,7 +13,7 @@ use lookup::{event_path, metadata_path, owned_value_path, path, OwnedValuePath}; use smallvec::{smallvec, SmallVec}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::Decoder; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, diff --git a/src/sources/mongodb_metrics/mod.rs b/src/sources/mongodb_metrics/mod.rs index d39ce6dbca91d..d80e6b1b0a1dd 100644 --- a/src/sources/mongodb_metrics/mod.rs +++ b/src/sources/mongodb_metrics/mod.rs @@ -15,7 +15,7 @@ use serde_with::serde_as; use snafu::{ResultExt, Snafu}; use tokio::time; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{metric_tags, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ diff --git a/src/sources/nats.rs b/src/sources/nats.rs index a8cf1730a5026..7337d35cc676c 100644 --- a/src/sources/nats.rs +++ b/src/sources/nats.rs @@ -4,7 +4,7 @@ use futures::{pin_mut, StreamExt}; use lookup::{lookup_v2::OptionalValuePath, owned_value_path}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, EventsReceived, InternalEventHandle as _, Protocol, }; diff --git a/src/sources/nginx_metrics/mod.rs b/src/sources/nginx_metrics/mod.rs index d010d8dbc7515..f3e409c5c7aec 100644 --- a/src/sources/nginx_metrics/mod.rs +++ b/src/sources/nginx_metrics/mod.rs @@ -12,7 +12,7 @@ use serde_with::serde_as; use snafu::{ResultExt, Snafu}; use tokio::time; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{metric_tags, EstimatedJsonEncodedSizeOf}; use crate::{ diff --git a/src/sources/opentelemetry/mod.rs b/src/sources/opentelemetry/mod.rs index c532577e26847..a4358a80d2adf 100644 --- a/src/sources/opentelemetry/mod.rs +++ b/src/sources/opentelemetry/mod.rs @@ -18,7 +18,7 @@ use opentelemetry_proto::convert::{ }; use opentelemetry_proto::proto::collector::logs::v1::logs_service_server::LogsServiceServer; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{BytesReceived, EventsReceived, Protocol}; use vector_lib::{ config::{log_schema, LegacyKey, LogNamespace}, diff --git a/src/sources/postgresql_metrics.rs b/src/sources/postgresql_metrics.rs index 9ab9de3613ad8..a354da27d32a9 100644 --- a/src/sources/postgresql_metrics.rs +++ b/src/sources/postgresql_metrics.rs @@ -25,8 +25,8 @@ use tokio_postgres::{ Client, Config, Error as PgError, NoTls, Row, }; use tokio_stream::wrappers::IntervalStream; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::{ internal_event::{CountByteSize, InternalEventHandle as _, Registered}, json_size::JsonSize, diff --git a/src/sources/prometheus/remote_write.rs b/src/sources/prometheus/remote_write.rs index 54b568c381b98..84fa60de444ce 100644 --- a/src/sources/prometheus/remote_write.rs +++ b/src/sources/prometheus/remote_write.rs @@ -3,8 +3,8 @@ use std::{collections::HashMap, net::SocketAddr}; use bytes::Bytes; use prometheus_parser::proto; use prost::Message; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use warp::http::{HeaderMap, StatusCode}; use super::parser; diff --git a/src/sources/prometheus/scrape.rs b/src/sources/prometheus/scrape.rs index 62cf5bd10e600..ec9112a65f517 100644 --- a/src/sources/prometheus/scrape.rs +++ b/src/sources/prometheus/scrape.rs @@ -6,7 +6,7 @@ use futures_util::FutureExt; use http::{response::Parts, Uri}; use serde_with::serde_as; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{config::LogNamespace, event::Event}; use super::parser; diff --git a/src/sources/redis/mod.rs b/src/sources/redis/mod.rs index 066ec8ddc8f83..4ca3bc3b73e46 100644 --- a/src/sources/redis/mod.rs +++ b/src/sources/redis/mod.rs @@ -8,7 +8,7 @@ use futures::StreamExt; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path, OwnedValuePath}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/socket/mod.rs b/src/sources/socket/mod.rs index d62b3d57d6ce6..7773ec0984a23 100644 --- a/src/sources/socket/mod.rs +++ b/src/sources/socket/mod.rs @@ -5,8 +5,8 @@ mod unix; use codecs::decoding::DeserializerConfig; use lookup::{lookup_v2::OptionalValuePath, owned_value_path}; -use vector_config::configurable_component; use vector_lib::config::{log_schema, LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::value::{kind::Collection, Kind}; #[cfg(unix)] diff --git a/src/sources/socket/tcp.rs b/src/sources/socket/tcp.rs index d3d1a9c5f849b..1d2899563a896 100644 --- a/src/sources/socket/tcp.rs +++ b/src/sources/socket/tcp.rs @@ -5,8 +5,8 @@ use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; use serde_with::serde_as; use smallvec::SmallVec; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use crate::{ codecs::Decoder, diff --git a/src/sources/socket/udp.rs b/src/sources/socket/udp.rs index e44e5abc3cdd7..3831926009de2 100644 --- a/src/sources/socket/udp.rs +++ b/src/sources/socket/udp.rs @@ -8,7 +8,7 @@ use futures::StreamExt; use listenfd::ListenFd; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; use tokio_util::codec::FramedRead; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; use vector_lib::{ config::{LegacyKey, LogNamespace}, diff --git a/src/sources/socket/unix.rs b/src/sources/socket/unix.rs index 3b697b80210c1..78dad0fcf059b 100644 --- a/src/sources/socket/unix.rs +++ b/src/sources/socket/unix.rs @@ -4,8 +4,8 @@ use bytes::Bytes; use chrono::Utc; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::{lookup_v2::OptionalValuePath, path}; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::shutdown::ShutdownSignal; use crate::{ diff --git a/src/sources/splunk_hec/acknowledgements.rs b/src/sources/splunk_hec/acknowledgements.rs index 87075d5247f20..2e261582afaf5 100644 --- a/src/sources/splunk_hec/acknowledgements.rs +++ b/src/sources/splunk_hec/acknowledgements.rs @@ -12,7 +12,7 @@ use futures::StreamExt; use roaring::RoaringTreemap; use serde::{Deserialize, Serialize}; use tokio::time::interval; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{finalization::BatchStatusReceiver, finalizer::UnorderedFinalizer}; use warp::Rejection; diff --git a/src/sources/splunk_hec/mod.rs b/src/sources/splunk_hec/mod.rs index 7b358df13443b..7e666796a8177 100644 --- a/src/sources/splunk_hec/mod.rs +++ b/src/sources/splunk_hec/mod.rs @@ -16,7 +16,7 @@ use serde::Serialize; use serde_json::{de::Read as JsonRead, Deserializer, Value as JsonValue}; use snafu::Snafu; use tracing::Span; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; use vector_lib::sensitive_string::SensitiveString; use vector_lib::{ diff --git a/src/sources/statsd/mod.rs b/src/sources/statsd/mod.rs index 8f4090c1e1a03..0f9a29c341486 100644 --- a/src/sources/statsd/mod.rs +++ b/src/sources/statsd/mod.rs @@ -13,7 +13,7 @@ use listenfd::ListenFd; use serde_with::serde_as; use smallvec::{smallvec, SmallVec}; use tokio_util::udp::UdpFramed; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; use vector_lib::EstimatedJsonEncodedSizeOf; diff --git a/src/sources/statsd/unix.rs b/src/sources/statsd/unix.rs index 7209268f9aa05..fd2116f1859a1 100644 --- a/src/sources/statsd/unix.rs +++ b/src/sources/statsd/unix.rs @@ -4,7 +4,7 @@ use codecs::{ decoding::{Deserializer, Framer}, NewlineDelimitedDecoder, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use super::StatsdDeserializer; use crate::{ diff --git a/src/sources/syslog.rs b/src/sources/syslog.rs index 36a50291d80f9..8e3e800991cdd 100644 --- a/src/sources/syslog.rs +++ b/src/sources/syslog.rs @@ -13,8 +13,8 @@ use listenfd::ListenFd; use lookup::{lookup_v2::OptionalValuePath, path, OwnedValuePath}; use smallvec::SmallVec; use tokio_util::udp::UdpFramed; -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::event_path; #[cfg(unix)] diff --git a/src/sources/util/body_decoding.rs b/src/sources/util/body_decoding.rs index ba90e3ef0efb3..6a99da3240792 100644 --- a/src/sources/util/body_decoding.rs +++ b/src/sources/util/body_decoding.rs @@ -1,4 +1,4 @@ -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Content encoding. #[configurable_component] diff --git a/src/sources/util/encoding_config.rs b/src/sources/util/encoding_config.rs index fed928e48a6d9..e24a2420181fe 100644 --- a/src/sources/util/encoding_config.rs +++ b/src/sources/util/encoding_config.rs @@ -1,4 +1,4 @@ -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// Character set encoding. #[configurable_component] diff --git a/src/sources/util/http/auth.rs b/src/sources/util/http/auth.rs index 4b3f47ca5bd10..f902cf3734db8 100644 --- a/src/sources/util/http/auth.rs +++ b/src/sources/util/http/auth.rs @@ -1,7 +1,7 @@ use std::convert::TryFrom; use headers::{Authorization, HeaderMapExt}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::sensitive_string::SensitiveString; use warp::http::HeaderMap; diff --git a/src/sources/util/http/method.rs b/src/sources/util/http/method.rs index 8f1783e594e1e..a816dc42f7cdc 100644 --- a/src/sources/util/http/method.rs +++ b/src/sources/util/http/method.rs @@ -1,5 +1,5 @@ use http::Method; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; /// HTTP method. #[configurable_component] diff --git a/src/sources/util/multiline_config.rs b/src/sources/util/multiline_config.rs index 9a8d9df734798..2736fb3398a77 100644 --- a/src/sources/util/multiline_config.rs +++ b/src/sources/util/multiline_config.rs @@ -3,7 +3,7 @@ use std::{convert::TryFrom, time::Duration}; use regex::bytes::Regex; use serde_with::serde_as; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::line_agg; diff --git a/src/sources/util/net/mod.rs b/src/sources/util/net/mod.rs index a7d7bf4192e55..6a3329c88e0ff 100644 --- a/src/sources/util/net/mod.rs +++ b/src/sources/util/net/mod.rs @@ -6,7 +6,7 @@ mod udp; use std::{fmt, net::SocketAddr}; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::config::{Protocol, Resource}; diff --git a/src/sources/vector/mod.rs b/src/sources/vector/mod.rs index 5780aff0638e4..0d006952ba439 100644 --- a/src/sources/vector/mod.rs +++ b/src/sources/vector/mod.rs @@ -5,7 +5,7 @@ use chrono::Utc; use codecs::NativeDeserializerConfig; use futures::TryFutureExt; use tonic::{Request, Response, Status}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; use vector_lib::{ config::LogNamespace, diff --git a/src/template.rs b/src/template.rs index f1db00d4792a4..510679ff70ee7 100644 --- a/src/template.rs +++ b/src/template.rs @@ -10,7 +10,7 @@ use lookup::lookup_v2::parse_target_path; use once_cell::sync::Lazy; use regex::Regex; use snafu::Snafu; -use vector_config::{configurable_component, ConfigurableString}; +use vector_lib::configurable::{configurable_component, ConfigurableString}; use crate::{ config::log_schema, diff --git a/src/test_util/mock/sinks/backpressure.rs b/src/test_util/mock/sinks/backpressure.rs index 1c3974a71e168..44745a5fbfb25 100644 --- a/src/test_util/mock/sinks/backpressure.rs +++ b/src/test_util/mock/sinks/backpressure.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use futures::stream::BoxStream; use futures::{FutureExt, StreamExt}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::config::{AcknowledgementsConfig, Input, SinkConfig, SinkContext}; use crate::event::Event; diff --git a/src/test_util/mock/sinks/basic.rs b/src/test_util/mock/sinks/basic.rs index be772d7e6de38..d6af6ac66aaaa 100644 --- a/src/test_util/mock/sinks/basic.rs +++ b/src/test_util/mock/sinks/basic.rs @@ -2,7 +2,7 @@ use async_trait::async_trait; use futures_util::{stream::BoxStream, FutureExt, StreamExt}; use snafu::Snafu; use tokio::sync::oneshot; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::finalization::Finalizable; use vector_lib::{ config::{AcknowledgementsConfig, Input}, diff --git a/src/test_util/mock/sinks/error.rs b/src/test_util/mock/sinks/error.rs index 94960d4f270cf..8b7bb585fbc4f 100644 --- a/src/test_util/mock/sinks/error.rs +++ b/src/test_util/mock/sinks/error.rs @@ -5,7 +5,7 @@ use std::{ use async_trait::async_trait; use futures_util::{future::ok, FutureExt, Sink}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::Event, diff --git a/src/test_util/mock/sinks/oneshot.rs b/src/test_util/mock/sinks/oneshot.rs index 045dc6d4e6f25..81a6089f0c1a6 100644 --- a/src/test_util/mock/sinks/oneshot.rs +++ b/src/test_util/mock/sinks/oneshot.rs @@ -3,7 +3,7 @@ use std::sync::{Arc, Mutex}; use async_trait::async_trait; use futures_util::{stream::BoxStream, StreamExt}; use tokio::sync::oneshot::Sender; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::EventArray, diff --git a/src/test_util/mock/sinks/panic.rs b/src/test_util/mock/sinks/panic.rs index 75ba456fd10b3..4da861033ef27 100644 --- a/src/test_util/mock/sinks/panic.rs +++ b/src/test_util/mock/sinks/panic.rs @@ -5,7 +5,7 @@ use std::{ use async_trait::async_trait; use futures_util::{future::ok, FutureExt, Sink}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::Event, diff --git a/src/test_util/mock/sources/backpressure.rs b/src/test_util/mock/sources/backpressure.rs index 67598b87e42f6..46d66b3372eb0 100644 --- a/src/test_util/mock/sources/backpressure.rs +++ b/src/test_util/mock/sources/backpressure.rs @@ -5,7 +5,7 @@ use std::sync::{ use async_trait::async_trait; use futures_util::FutureExt; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::LogNamespace, event::{Event, LogEvent}, diff --git a/src/test_util/mock/sources/basic.rs b/src/test_util/mock/sources/basic.rs index 7ec4b50939116..59310030a08db 100644 --- a/src/test_util/mock/sources/basic.rs +++ b/src/test_util/mock/sources/basic.rs @@ -5,7 +5,7 @@ use std::sync::{ use async_trait::async_trait; use vector_buffers::topology::channel::{limited, LimitedReceiver}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{config::LogNamespace, schema::Definition}; use vector_lib::{ config::{DataType, SourceOutput}, diff --git a/src/test_util/mock/sources/error.rs b/src/test_util/mock/sources/error.rs index daedd17e9cdbf..b523dd6ef6718 100644 --- a/src/test_util/mock/sources/error.rs +++ b/src/test_util/mock/sources/error.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use futures_util::{future::err, FutureExt}; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::schema::Definition; use vector_lib::{ config::{DataType, SourceOutput}, diff --git a/src/test_util/mock/sources/panic.rs b/src/test_util/mock/sources/panic.rs index 2ca6cf402174f..c495ec250c1c3 100644 --- a/src/test_util/mock/sources/panic.rs +++ b/src/test_util/mock/sources/panic.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::schema::Definition; use vector_lib::{ config::{DataType, SourceOutput}, diff --git a/src/test_util/mock/sources/tripwire.rs b/src/test_util/mock/sources/tripwire.rs index 81b2cb05d84d8..e01d5f6d78620 100644 --- a/src/test_util/mock/sources/tripwire.rs +++ b/src/test_util/mock/sources/tripwire.rs @@ -3,8 +3,8 @@ use std::sync::{Arc, Mutex}; use async_trait::async_trait; use futures_util::{future, FutureExt}; use stream_cancel::{Trigger, Tripwire}; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::schema::Definition; use vector_lib::{ config::{DataType, SourceOutput}, diff --git a/src/test_util/mock/transforms/basic.rs b/src/test_util/mock/transforms/basic.rs index 4aecc2398f76d..37f1291230152 100644 --- a/src/test_util/mock/transforms/basic.rs +++ b/src/test_util/mock/transforms/basic.rs @@ -1,8 +1,8 @@ use std::collections::BTreeSet; use async_trait::async_trait; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{DataType, Input, TransformOutput}, event::{ diff --git a/src/test_util/mock/transforms/error_definitions.rs b/src/test_util/mock/transforms/error_definitions.rs index 2b9a4333589f3..b3062ab1280e2 100644 --- a/src/test_util/mock/transforms/error_definitions.rs +++ b/src/test_util/mock/transforms/error_definitions.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use snafu::Snafu; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{DataType, Input, LogNamespace, TransformOutput}, schema::Definition, diff --git a/src/test_util/mock/transforms/mod.rs b/src/test_util/mock/transforms/mod.rs index 57f558aa0f2e4..ca5bba30be961 100644 --- a/src/test_util/mock/transforms/mod.rs +++ b/src/test_util/mock/transforms/mod.rs @@ -1,4 +1,4 @@ -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; mod basic; pub use self::basic::BasicTransformConfig; diff --git a/src/test_util/mock/transforms/noop.rs b/src/test_util/mock/transforms/noop.rs index 7e19e020602ef..a9285a28b7cbd 100644 --- a/src/test_util/mock/transforms/noop.rs +++ b/src/test_util/mock/transforms/noop.rs @@ -2,8 +2,8 @@ use std::pin::Pin; use async_trait::async_trait; use futures_util::Stream; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::{ config::{DataType, Input, TransformOutput}, event::{Event, EventContainer}, diff --git a/src/transforms/aggregate.rs b/src/transforms/aggregate.rs index 3b6c78988a1c5..8255eb4f45f9d 100644 --- a/src/transforms/aggregate.rs +++ b/src/transforms/aggregate.rs @@ -6,8 +6,8 @@ use std::{ use async_stream::stream; use futures::{Stream, StreamExt}; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use crate::{ config::{DataType, Input, OutputId, TransformConfig, TransformContext, TransformOutput}, diff --git a/src/transforms/aws_ec2_metadata.rs b/src/transforms/aws_ec2_metadata.rs index 995fbafe9b4c5..56ea9a0b92e45 100644 --- a/src/transforms/aws_ec2_metadata.rs +++ b/src/transforms/aws_ec2_metadata.rs @@ -14,8 +14,8 @@ use serde_with::serde_as; use snafu::ResultExt as _; use tokio::time::{sleep, Duration, Instant}; use tracing::Instrument; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vrl::value::kind::Collection; use vrl::value::Kind; diff --git a/src/transforms/dedupe.rs b/src/transforms/dedupe.rs index 16794b5ff8f78..a159998d8c8ff 100644 --- a/src/transforms/dedupe.rs +++ b/src/transforms/dedupe.rs @@ -4,8 +4,8 @@ use bytes::Bytes; use futures::{Stream, StreamExt}; use lookup::lookup_v2::ConfigTargetPath; use lru::LruCache; -use vector_config::configurable_component; use vector_lib::config::{clone_input_definitions, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::path::OwnedTargetPath; use crate::{ diff --git a/src/transforms/filter.rs b/src/transforms/filter.rs index ec6013d18037c..2c431f06cc3a8 100644 --- a/src/transforms/filter.rs +++ b/src/transforms/filter.rs @@ -1,5 +1,5 @@ -use vector_config::configurable_component; use vector_lib::config::{clone_input_definitions, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::internal_event::{Count, InternalEventHandle as _, Registered}; use crate::{ diff --git a/src/transforms/log_to_metric.rs b/src/transforms/log_to_metric.rs index 95e6a7f25cc57..b2448dde6ae07 100644 --- a/src/transforms/log_to_metric.rs +++ b/src/transforms/log_to_metric.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, num::ParseFloatError}; use chrono::Utc; use indexmap::IndexMap; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vector_lib::{config::LogNamespace, event::DatadogMetricOriginMetadata}; use vrl::path::parse_target_path; diff --git a/src/transforms/lua/mod.rs b/src/transforms/lua/mod.rs index b3b543162fa3c..e6fd152bfaf96 100644 --- a/src/transforms/lua/mod.rs +++ b/src/transforms/lua/mod.rs @@ -1,8 +1,8 @@ pub mod v1; pub mod v2; -use vector_config::configurable_component; use vector_lib::config::{ComponentKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use crate::{ config::{GenerateConfig, Input, OutputId, TransformConfig, TransformContext, TransformOutput}, diff --git a/src/transforms/lua/v1/mod.rs b/src/transforms/lua/v1/mod.rs index 5fb82cf9610a3..b329cd732a4a8 100644 --- a/src/transforms/lua/v1/mod.rs +++ b/src/transforms/lua/v1/mod.rs @@ -5,7 +5,7 @@ use mlua::ExternalError; use mlua::FromLua; use ordered_float::NotNan; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vrl::path::parse_target_path; use crate::config::OutputId; diff --git a/src/transforms/lua/v2/mod.rs b/src/transforms/lua/v2/mod.rs index d4be1e88ab6aa..e2f60bc5c9c48 100644 --- a/src/transforms/lua/v2/mod.rs +++ b/src/transforms/lua/v2/mod.rs @@ -3,7 +3,7 @@ use std::{path::PathBuf, sync::Arc, time::Duration}; use codecs::MetricTagValues; use serde_with::serde_as; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; pub use vector_lib::event::lua; use vector_lib::transform::runtime_transform::{RuntimeTransform, Timer}; diff --git a/src/transforms/metric_to_log.rs b/src/transforms/metric_to_log.rs index ac67ba0850e8b..082af69b84c1c 100644 --- a/src/transforms/metric_to_log.rs +++ b/src/transforms/metric_to_log.rs @@ -3,8 +3,8 @@ use codecs::MetricTagValues; use lookup::{event_path, owned_value_path, path, PathPrefix}; use serde_json::Value; use std::collections::{BTreeMap, BTreeSet}; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::TimeZone; use vrl::path::OwnedValuePath; use vrl::value::kind::Collection; diff --git a/src/transforms/reduce/merge_strategy.rs b/src/transforms/reduce/merge_strategy.rs index e7ddd9cd80386..2580636f09cec 100644 --- a/src/transforms/reduce/merge_strategy.rs +++ b/src/transforms/reduce/merge_strategy.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; use bytes::{Bytes, BytesMut}; use chrono::{DateTime, Utc}; use ordered_float::NotNan; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use vrl::event_path; use crate::event::{LogEvent, Value}; diff --git a/src/transforms/reduce/mod.rs b/src/transforms/reduce/mod.rs index c8d0d851f1aeb..4d99c5cd650f9 100644 --- a/src/transforms/reduce/mod.rs +++ b/src/transforms/reduce/mod.rs @@ -10,7 +10,7 @@ use std::{ pin::Pin, time::{Duration, Instant}, }; -use vector_config::configurable_component; +use vector_lib::configurable::configurable_component; use crate::config::OutputId; use crate::{ diff --git a/src/transforms/remap.rs b/src/transforms/remap.rs index bd2535f011c0b..099aaf0ccc9fc 100644 --- a/src/transforms/remap.rs +++ b/src/transforms/remap.rs @@ -9,9 +9,9 @@ use std::{ use codecs::MetricTagValues; use lookup::{metadata_path, owned_value_path, PathPrefix}; use snafu::{ResultExt, Snafu}; -use vector_config::configurable_component; use vector_lib::compile_vrl; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; use vector_lib::schema::Definition; use vector_lib::TimeZone; use vector_vrl_functions::set_semantic_meaning::MeaningList; diff --git a/src/transforms/route.rs b/src/transforms/route.rs index 4370a098e6a69..c1f17345f4584 100644 --- a/src/transforms/route.rs +++ b/src/transforms/route.rs @@ -1,6 +1,6 @@ use indexmap::IndexMap; -use vector_config::configurable_component; use vector_lib::config::{clone_input_definitions, LogNamespace}; +use vector_lib::configurable::configurable_component; use vector_lib::transform::SyncTransform; use crate::{ diff --git a/src/transforms/sample.rs b/src/transforms/sample.rs index 5e51e063f3209..240cf03108f22 100644 --- a/src/transforms/sample.rs +++ b/src/transforms/sample.rs @@ -1,5 +1,5 @@ -use vector_config::configurable_component; use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::configurable::configurable_component; use vrl::value::Kind; use vrl::{event_path, owned_value_path}; diff --git a/src/transforms/tag_cardinality_limit/config.rs b/src/transforms/tag_cardinality_limit/config.rs index e4ede27afb734..4864fc2abc6cc 100644 --- a/src/transforms/tag_cardinality_limit/config.rs +++ b/src/transforms/tag_cardinality_limit/config.rs @@ -6,8 +6,8 @@ use crate::config::{ use crate::schema; use crate::transforms::tag_cardinality_limit::TagCardinalityLimit; use crate::transforms::Transform; -use vector_config::configurable_component; use vector_lib::config::LogNamespace; +use vector_lib::configurable::configurable_component; /// Configuration for the `tag_cardinality_limit` transform. #[configurable_component(transform( diff --git a/src/transforms/throttle.rs b/src/transforms/throttle.rs index dff11c6f50bdd..c1e12e0fd5eaa 100644 --- a/src/transforms/throttle.rs +++ b/src/transforms/throttle.rs @@ -5,8 +5,8 @@ use futures::{Stream, StreamExt}; use governor::{clock, Quota, RateLimiter}; use serde_with::serde_as; use snafu::Snafu; -use vector_config::configurable_component; use vector_lib::config::{clone_input_definitions, LogNamespace}; +use vector_lib::configurable::configurable_component; use crate::{ conditions::{AnyCondition, Condition},