Skip to main content

Crate sinks_core

Crate sinks_core 

Source
Expand description

§flusso-sinks-core

The sink abstraction for flusso — where assembled documents land.

§Quick reference

ItemRole
SinkThe trait every destination implements
FanOutSinkA Sink that broadcasts each write to several sinks
to_jsonRenders a GenericValue as natural JSON (numbers as numbers, maps as objects)
FlushReport / RejectedDocumentA flush’s outcome, including any documents the destination applied-but-rejected
SinkError / ResultThe shared error type

A sink consumes neutral values — an IndexName, a string id, and a document GenericValue — so it depends on neither the source nor the engine. The engine is what feeds it.

to_json is the OpenSearch-flavored translation most sinks need at their boundary; a sink converts the canonical GenericValue into its own representation there.

Structs§

FanOutSink
Dispatches every sink operation to a set of inner sinks in declaration order.
FlushReport
The outcome of a flush: which buffered documents the destination rejected at the item level.
RejectedDocument
One document a sink rejected at the item level during a flush. The names are the destination’s own (e.g. an OpenSearch physical index), for diagnostics and quarantine records.

Enums§

SinkError
Why a sink write failed.

Traits§

Sink
A destination for assembled documents.

Functions§

to_json
Convert a document value into the JSON a sink ingests.

Type Aliases§

Result
Result alias for sink operations.