Enum mz_storage_types::sources::SourceEnvelope
source · pub enum SourceEnvelope {
None(NoneEnvelope),
Debezium(DebeziumEnvelope),
Upsert(UpsertEnvelope),
CdcV2,
}Expand description
SourceEnvelopes describe how to turn a stream of messages from SourceDescs
into a differential stream, that is, a stream of (data, time, diff)
triples.
PostgreSQL sources skip any explicit envelope handling, effectively
asserting that SourceEnvelope is None with KeyEnvelope::None.
Variants§
None(NoneEnvelope)
The most trivial version is None, which typically produces triples where the diff
is 1. However, some sources are able to produce values with more exotic diff’s,
such as the posgres source. Currently, this is the only variant usable with
those sources.
If the KeyEnvelope is present,
include the key columns as an output column of the source with the given properties.
Debezium(DebeziumEnvelope)
Debezium avoids holding onto previously seen values by trusting the required
before and after value fields coming from the upstream source.
Upsert(UpsertEnvelope)
Upsert holds onto previously seen values and produces 1 or -1 diffs depending on
whether or not the required key outputed by the source has been seen before. This also
supports a Debezium mode.
CdcV2
CdcV2 requires sources output messages in a strict form that requires a upstream-provided
timeline.
Trait Implementations§
source§impl Arbitrary for SourceEnvelope
impl Arbitrary for SourceEnvelope
§type Parameters = (<NoneEnvelope as Arbitrary>::Parameters, <DebeziumEnvelope as Arbitrary>::Parameters, <UpsertEnvelope as Arbitrary>::Parameters)
type Parameters = (<NoneEnvelope as Arbitrary>::Parameters, <DebeziumEnvelope as Arbitrary>::Parameters, <UpsertEnvelope as Arbitrary>::Parameters)
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Union<BoxedStrategy<SourceEnvelope>>
type Strategy = Union<BoxedStrategy<SourceEnvelope>>
Strategy used to generate values of type Self.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for SourceEnvelope
impl Clone for SourceEnvelope
source§fn clone(&self) -> SourceEnvelope
fn clone(&self) -> SourceEnvelope
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SourceEnvelope
impl Debug for SourceEnvelope
source§impl<'de> Deserialize<'de> for SourceEnvelope
impl<'de> Deserialize<'de> for SourceEnvelope
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 PartialEq for SourceEnvelope
impl PartialEq for SourceEnvelope
source§fn eq(&self, other: &SourceEnvelope) -> bool
fn eq(&self, other: &SourceEnvelope) -> bool
self and other values to be equal, and is used
by ==.source§impl RustType<ProtoSourceEnvelope> for SourceEnvelope
impl RustType<ProtoSourceEnvelope> for SourceEnvelope
source§fn into_proto(&self) -> ProtoSourceEnvelope
fn into_proto(&self) -> ProtoSourceEnvelope
Self into a Proto value.source§fn from_proto(proto: ProtoSourceEnvelope) -> Result<Self, TryFromProtoError>
fn from_proto(proto: ProtoSourceEnvelope) -> Result<Self, TryFromProtoError>
source§impl Serialize for SourceEnvelope
impl Serialize for SourceEnvelope
impl Eq for SourceEnvelope
impl StructuralEq for SourceEnvelope
impl StructuralPartialEq for SourceEnvelope
Auto Trait Implementations§
impl RefUnwindSafe for SourceEnvelope
impl Send for SourceEnvelope
impl Sync for SourceEnvelope
impl Unpin for SourceEnvelope
impl UnwindSafe for SourceEnvelope
Blanket Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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::Requestsource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto.