Skip to main content

SinkConfig

Trait SinkConfig 

Source
pub trait SinkConfig:
    DynClone
    + NamedComponent
    + Debug
    + Send
    + Sync
    + Serialize
    + Deserialize {
    // Required methods
    fn input(&self) -> Input;
    fn acknowledgements(&self) -> &AcknowledgementsConfig;

    // Provided methods
    fn build<'life0, 'async_trait>(
        &'life0 self,
        cx: SinkContext,
    ) -> Pin<Box<dyn Future<Output = Result<(VectorSink, Healthcheck)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn files_to_watch(&self) -> Vec<&PathBuf> { ... }
    fn resources(&self) -> Vec<Resource> { ... }
    fn confinement_config(&self) -> Option<&ConfinementConfig> { ... }
    fn as_dyn_validated(&self) -> Option<&dyn DynValidatedSink> { ... }
}
Expand description

Generalized interface for describing and building sink components.

Required Methods§

Source

fn input(&self) -> Input

Gets the input configuration for this sink.

Source

fn acknowledgements(&self) -> &AcknowledgementsConfig

Gets the acknowledgements configuration for this sink.

Provided Methods§

Source

fn build<'life0, 'async_trait>( &'life0 self, cx: SinkContext, ) -> Pin<Box<dyn Future<Output = Result<(VectorSink, Healthcheck)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Builds the sink with the given context.

Migrated sinks route through the validated lifecycle: this default validates the structure and builds from the retained state. Legacy sinks override this with their own build logic.

§Errors

If an error occurs while building the sink, an error variant explaining the issue is returned.

Source

fn files_to_watch(&self) -> Vec<&PathBuf>

Gets the files to watch to trigger reload

Source

fn resources(&self) -> Vec<Resource>

Gets the list of resources, if any, used by this sink.

Resources represent dependencies – network ports, file descriptors, and so on – that cannot be shared between components at runtime. This ensures that components can not be configured in a way that would deadlock the spawning of a topology, and as well, allows Vector to determine the correct order for rebuilding a topology during configuration reload when resources must first be reclaimed before being reassigned, and so on.

Source

fn confinement_config(&self) -> Option<&ConfinementConfig>

Returns this sink’s template-confinement config, if it supports confinement.

The topology uses this to own the vector_security_confinement_disabled gauge for the sink’s lifetime. None (the default) means the sink does not participate in template confinement and emits no gauge.

Source

fn as_dyn_validated(&self) -> Option<&dyn DynValidatedSink>

Returns this sink as a DynValidatedSink if it has been migrated to the validated lifecycle, or None for legacy sinks.

Migrated sinks implement ValidatedSink (working with their concrete validated type) and override this to return Some(self). The framework then routes validation and building through the dynamic boundary automatically.

Trait Implementations§

Source§

impl<'typetag> Serialize for dyn SinkConfig + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SinkConfig + Send + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SinkConfig + Send + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SinkConfig + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Implementors§

Source§

impl SinkConfig for MemoryConfig

Source§

impl SinkConfig for AmqpSinkConfig

Source§

impl SinkConfig for CloudwatchLogsSinkConfig

Source§

impl SinkConfig for CloudWatchMetricsSinkConfig

Source§

impl SinkConfig for KinesisFirehoseSinkConfig

Source§

impl SinkConfig for KinesisStreamsSinkConfig

Source§

impl SinkConfig for S3SinkConfig

Source§

impl SinkConfig for AxiomConfig

Source§

impl SinkConfig for AzureBlobSinkConfig

Source§

impl SinkConfig for AzureLogsIngestionConfig

Source§

impl SinkConfig for BlackholeConfig

Source§

impl SinkConfig for ClickhouseConfig

Source§

impl SinkConfig for ConsoleSinkConfig

Source§

impl SinkConfig for DatabendConfig

Source§

impl SinkConfig for ZerobusSinkConfig

Source§

impl SinkConfig for DatadogEventsConfig

Source§

impl SinkConfig for DatadogLogsConfig

Source§

impl SinkConfig for DatadogMetricsConfig

Source§

impl SinkConfig for DatadogTracesConfig

Source§

impl SinkConfig for DorisConfig

Source§

impl SinkConfig for ElasticsearchConfig

Source§

impl SinkConfig for FileSinkConfig

Source§

impl SinkConfig for GcsSinkConfig

Source§

impl SinkConfig for PubsubConfig

Source§

impl SinkConfig for ChronicleUnstructuredConfig

Source§

impl SinkConfig for HttpSinkConfig

Source§

impl SinkConfig for HumioLogsConfig

Source§

impl SinkConfig for HumioMetricsConfig

Source§

impl SinkConfig for InfluxDbLogsConfig

Source§

impl SinkConfig for InfluxDbConfig

Source§

impl SinkConfig for KafkaSinkConfig

Source§

impl SinkConfig for LokiConfig

Source§

impl SinkConfig for MezmoConfig

Source§

impl SinkConfig for MqttSinkConfig

Source§

impl SinkConfig for OpenTelemetryConfig

Source§

impl SinkConfig for PapertrailConfig

Source§

impl SinkConfig for PostgresConfig

Source§

impl SinkConfig for PrometheusExporterConfig

Source§

impl SinkConfig for SematextLogsConfig

Source§

impl SinkConfig for SematextMetricsConfig

Source§

impl SinkConfig for SocketSinkConfig

Source§

impl SinkConfig for HecLogsSinkConfig

Source§

impl SinkConfig for HecMetricsSinkConfig

Source§

impl SinkConfig for StatsdSinkConfig

Source§

impl SinkConfig for VectorConfig

Source§

impl SinkConfig for WebHdfsConfig

Source§

impl SinkConfig for WebSocketSinkConfig

Source§

impl SinkConfig for WebSocketListenerSinkConfig

Source§

impl SinkConfig for UnitTestSinkConfig

Source§

impl SinkConfig for UnitTestStreamSinkConfig