pub struct FlowDescriptorBuilder<K> { /* private fields */ }Expand description
Builds a FlowDescriptor, which defines the schema of a flow.
The builder is mutable, to allow for the addition of channels to the flow descriptor while the descriptor itself is immuatble, ensuring that the described flow will be constructed correctly.
Implementations§
Source§impl<K> FlowDescriptorBuilder<K>
impl<K> FlowDescriptorBuilder<K>
Sourcepub fn new(
ingestion_config_id: impl Into<String>,
name: impl Into<String>,
) -> Self
pub fn new( ingestion_config_id: impl Into<String>, name: impl Into<String>, ) -> Self
Initializes a new FlowDescriptorBuilder with the provided ingestion config ID and flow name.
Sourcepub fn add(&mut self, key: K, field_type: ChannelDataType) -> ChannelIndex
pub fn add(&mut self, key: K, field_type: ChannelDataType) -> ChannelIndex
Adds a new channel to the flow.
This returns the index of the channel in the flow. This index can then be used to access the value at the given channel index when building a new flow.
Sourcepub fn build(self) -> FlowDescriptor<K>
pub fn build(self) -> FlowDescriptor<K>
Builds the FlowDescriptor from the builder.
Auto Trait Implementations§
impl<K> Freeze for FlowDescriptorBuilder<K>
impl<K> RefUnwindSafe for FlowDescriptorBuilder<K>where
K: RefUnwindSafe,
impl<K> Send for FlowDescriptorBuilder<K>where
K: Send,
impl<K> Sync for FlowDescriptorBuilder<K>where
K: Sync,
impl<K> Unpin for FlowDescriptorBuilder<K>where
K: Unpin,
impl<K> UnwindSafe for FlowDescriptorBuilder<K>where
K: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request