Enum codecs::decoding::DeserializerConfig
source · pub enum DeserializerConfig {
Bytes,
Json(JsonDeserializerConfig),
Protobuf(ProtobufDeserializerConfig),
Syslog(SyslogDeserializerConfig),
Native,
NativeJson(NativeJsonDeserializerConfig),
Gelf(GelfDeserializerConfig),
Influxdb(InfluxdbDeserializerConfig),
Avro {
avro: AvroDeserializerOptions,
},
Vrl(VrlDeserializerConfig),
}
Expand description
Deserializer configuration.
Variants§
Bytes
Uses the raw bytes as-is.
Json(JsonDeserializerConfig)
Decodes the raw bytes as JSON.
Protobuf(ProtobufDeserializerConfig)
Decodes the raw bytes as protobuf.
Syslog(SyslogDeserializerConfig)
Decodes the raw bytes as a Syslog message.
Decodes either as the RFC 3164-style format (“old” style) or the RFC 5424-style format (“new” style, includes structured data).
Native
Decodes the raw bytes as native Protocol Buffers format.
This codec is experimental.
NativeJson(NativeJsonDeserializerConfig)
Decodes the raw bytes as native JSON format.
This codec is experimental.
Gelf(GelfDeserializerConfig)
Decodes the raw bytes as a GELF message.
This codec is experimental for the following reason:
The GELF specification is more strict than the actual Graylog receiver.
Vector’s decoder currently adheres more strictly to the GELF spec, with
the exception that some characters such as @
are allowed in field names.
Other GELF codecs such as Loki’s, use a Go SDK that is maintained by Graylog, and is much more relaxed than the GELF spec.
Going forward, Vector will use that Go SDK as the reference implementation, which means the codec may continue to relax the enforcement of specification.
Influxdb(InfluxdbDeserializerConfig)
Decodes the raw bytes as an Influxdb Line Protocol message.
Avro
Decodes the raw bytes as as an Apache Avro message.
Fields
avro: AvroDeserializerOptions
Apache Avro-specific encoder options.
Vrl(VrlDeserializerConfig)
Decodes the raw bytes as a string and passes them as input to a VRL program.
Implementations§
source§impl DeserializerConfig
impl DeserializerConfig
sourcepub fn build(&self) -> Result<Deserializer>
pub fn build(&self) -> Result<Deserializer>
Build the Deserializer
from this configuration.
sourcepub fn default_stream_framing(&self) -> FramingConfig
pub fn default_stream_framing(&self) -> FramingConfig
Return an appropriate default framer for the given deserializer
sourcepub fn default_message_based_framing(&self) -> FramingConfig
pub fn default_message_based_framing(&self) -> FramingConfig
Returns an appropriate default framing config for the given deserializer with message based inputs.
sourcepub fn output_type(&self) -> DataType
pub fn output_type(&self) -> DataType
Return the type of event build by this deserializer.
sourcepub fn schema_definition(&self, log_namespace: LogNamespace) -> Definition
pub fn schema_definition(&self, log_namespace: LogNamespace) -> Definition
The schema produced by the deserializer.
sourcepub const fn content_type(&self, framer: &FramingConfig) -> &'static str
pub const fn content_type(&self, framer: &FramingConfig) -> &'static str
Get the HTTP content type.
Trait Implementations§
source§impl Clone for DeserializerConfig
impl Clone for DeserializerConfig
source§fn clone(&self) -> DeserializerConfig
fn clone(&self) -> DeserializerConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Configurable for DeserializerConfig
impl Configurable for DeserializerConfig
source§fn referenceable_name() -> Option<&'static str>
fn referenceable_name() -> Option<&'static str>
source§fn generate_schema(
schema_gen: &RefCell<SchemaGenerator>,
) -> Result<SchemaObject, GenerateError>
fn generate_schema( schema_gen: &RefCell<SchemaGenerator>, ) -> Result<SchemaObject, GenerateError>
§fn is_optional() -> boolwhere
Self: Sized,
fn is_optional() -> boolwhere
Self: Sized,
§fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
§fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
source§impl Debug for DeserializerConfig
impl Debug for DeserializerConfig
source§impl<'de> Deserialize<'de> for DeserializerConfig
impl<'de> Deserialize<'de> for DeserializerConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<BytesDeserializerConfig> for DeserializerConfig
impl From<BytesDeserializerConfig> for DeserializerConfig
source§fn from(_: BytesDeserializerConfig) -> Self
fn from(_: BytesDeserializerConfig) -> Self
source§impl From<GelfDeserializerConfig> for DeserializerConfig
impl From<GelfDeserializerConfig> for DeserializerConfig
source§fn from(config: GelfDeserializerConfig) -> Self
fn from(config: GelfDeserializerConfig) -> Self
source§impl From<InfluxdbDeserializerConfig> for DeserializerConfig
impl From<InfluxdbDeserializerConfig> for DeserializerConfig
source§fn from(config: InfluxdbDeserializerConfig) -> Self
fn from(config: InfluxdbDeserializerConfig) -> Self
source§impl From<JsonDeserializerConfig> for DeserializerConfig
impl From<JsonDeserializerConfig> for DeserializerConfig
source§fn from(config: JsonDeserializerConfig) -> Self
fn from(config: JsonDeserializerConfig) -> Self
source§impl From<NativeDeserializerConfig> for DeserializerConfig
impl From<NativeDeserializerConfig> for DeserializerConfig
source§fn from(_: NativeDeserializerConfig) -> Self
fn from(_: NativeDeserializerConfig) -> Self
source§impl From<NativeJsonDeserializerConfig> for DeserializerConfig
impl From<NativeJsonDeserializerConfig> for DeserializerConfig
source§fn from(config: NativeJsonDeserializerConfig) -> Self
fn from(config: NativeJsonDeserializerConfig) -> Self
source§impl From<SyslogDeserializerConfig> for DeserializerConfig
impl From<SyslogDeserializerConfig> for DeserializerConfig
source§fn from(config: SyslogDeserializerConfig) -> Self
fn from(config: SyslogDeserializerConfig) -> Self
source§impl Serialize for DeserializerConfig
impl Serialize for DeserializerConfig
Auto Trait Implementations§
impl Freeze for DeserializerConfig
impl RefUnwindSafe for DeserializerConfig
impl Send for DeserializerConfig
impl Sync for DeserializerConfig
impl Unpin for DeserializerConfig
impl UnwindSafe for DeserializerConfig
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more