Trait Sink

Source
pub trait Sink: TryFrom<SinkParam, Error = SinkError> {
    type LogSinker: LogSinker;
    type Coordinator: SinkCommitCoordinator = NoSinkCommitCoordinator;

    const SINK_NAME: &'static str;

    // Required methods
    async fn validate(&self) -> Result<()>;
    async fn new_log_sinker(
        &self,
        writer_param: SinkWriterParam,
    ) -> Result<Self::LogSinker>;

    // Provided methods
    fn set_default_commit_checkpoint_interval(
        desc: &mut SinkDesc,
        user_specified: &SinkDecouple,
    ) -> Result<()> { ... }
    fn is_sink_decouple(user_specified: &SinkDecouple) -> Result<bool> { ... }
    fn support_schema_change() -> bool { ... }
    fn validate_alter_config(_config: &BTreeMap<String, String>) -> Result<()> { ... }
    fn is_coordinated_sink(&self) -> bool { ... }
    async fn new_coordinator(
        &self,
        _db: DatabaseConnection,
        _iceberg_compact_stat_sender: Option<UnboundedSender<IcebergSinkCompactionUpdate>>,
    ) -> Result<Self::Coordinator> { ... }
}

Required Associated Constants§

Source

const SINK_NAME: &'static str

Required Associated Types§

Provided Associated Types§

Required Methods§

Source

async fn validate(&self) -> Result<()>

Source

async fn new_log_sinker( &self, writer_param: SinkWriterParam, ) -> Result<Self::LogSinker>

Provided Methods§

Source

fn set_default_commit_checkpoint_interval( desc: &mut SinkDesc, user_specified: &SinkDecouple, ) -> Result<()>

Source

fn is_sink_decouple(user_specified: &SinkDecouple) -> Result<bool>

user_specified is the value of sink_decouple config.

Source

fn support_schema_change() -> bool

Source

fn validate_alter_config(_config: &BTreeMap<String, String>) -> Result<()>

Source

fn is_coordinated_sink(&self) -> bool

Source

async fn new_coordinator( &self, _db: DatabaseConnection, _iceberg_compact_stat_sender: Option<UnboundedSender<IcebergSinkCompactionUpdate>>, ) -> Result<Self::Coordinator>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Sink for BigQuerySink

Source§

const SINK_NAME: &'static str = BIGQUERY_SINK

Source§

type LogSinker = BigQueryLogSinker

Source§

impl Sink for ClickHouseSink

Source§

impl Sink for DeltaLakeSink

Source§

impl Sink for DorisSink

Source§

impl Sink for DynamoDbSink

Source§

impl Sink for ElasticSearchSink

Source§

impl Sink for OpenSearchSink

Source§

impl Sink for GooglePubSubSink

Source§

impl Sink for IcebergSink

Source§

impl Sink for KafkaSink

Source§

impl Sink for KinesisSink

Source§

impl Sink for MongodbSink

Source§

impl Sink for MqttSink

Source§

impl Sink for NatsSink

Source§

impl Sink for PostgresSink

Source§

const SINK_NAME: &'static str = POSTGRES_SINK

Source§

type LogSinker = PostgresSinkWriter

Source§

impl Sink for PulsarSink

Source§

impl Sink for RedisSink

Source§

impl Sink for SqlServerSink

Source§

impl Sink for StarrocksSink

Source§

impl Sink for TestSink

Source§

const SINK_NAME: &'static str = "test"

Source§

type Coordinator = Box<dyn SinkCommitCoordinator + Send>

Source§

type LogSinker = Box<dyn for<'a> FnOnce(&'a mut dyn DynLogReader) -> Pin<Box<dyn Future<Output = Result<!, SinkError>> + Send + 'a>> + Send>

Source§

impl<R: RemoteSinkTrait> Sink for CoordinatedRemoteSink<R>

Source§

impl<R: RemoteSinkTrait> Sink for RemoteSink<R>

Source§

const SINK_NAME: &'static str = R::SINK_NAME

Source§

type LogSinker = RemoteLogSinker

Source§

impl<S: OpendalSinkBackend> Sink for FileSink<S>

Source§

const SINK_NAME: &'static str = S::SINK_NAME

Source§

type LogSinker = BatchingLogSinker

Source§

impl<S: FeatureNotEnabledSinkMarker> Sink for FeatureNotEnabledSink<S>

Source§

impl<T: TrivialSinkName> Sink for TrivialSink<T>

Source§

const SINK_NAME: &'static str = T::SINK_NAME

Source§

type LogSinker = TrivialSink<T>