Skip to main content

OutputSink

Trait OutputSink 

Source
pub trait OutputSink: Send + Sync {
    // Required method
    fn open(&self, cx: SinkCtx) -> Result<Box<dyn Sink>, String>;

    // Provided methods
    fn describe(&self) -> String { ... }
    fn chainable(&self) -> bool { ... }
}
Expand description

A sink provided from outside the engine — a connector’s (a Kafka topic, files, Iceberg, Flight, the blackhole) or a host’s own (a fan-out, a test collector) — the symmetric counterpart of InlineSource. The runtime builds one per sink task, at start, on the worker that owns the task (a durable sink’s directory must be opened by its one owner); a builder that fails fails the start before any task runs, naming the sink.

Required Methods§

Source

fn open(&self, cx: SinkCtx) -> Result<Box<dyn Sink>, String>

Provided Methods§

Source

fn describe(&self) -> String

One line for the stage log: what this sink is.

Source

fn chainable(&self) -> bool

true for a sink the engine may CHAIN into the source task that feeds it (STREAM_CHAIN_SINK=1, at-least-once): built eagerly on every worker, acking its barriers inline. A sink that opens an exclusive resource or acks from off-thread must say false (the default).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§