#[non_exhaustive]pub struct DatagenSourceConfig {
pub dataset: Dataset,
pub encoding: Encoding,
pub partitions: u32,
pub seed: u64,
pub tick_interval: Duration,
pub events_per_tick: u32,
pub count: Option<u64>,
pub clock: Clock,
pub epoch_ms: i64,
}Expand description
Configuration of a DatagenSource.
Every key has a default, so source: { datagen: {} } is a complete
section.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dataset: DatasetThe built-in dataset to generate.
encoding: EncodingWire format of the payloads.
partitions: u32How many lanes to run, and therefore how many framework partitions the pipeline sees. Each lane owns a disjoint slice of the order-id space and generates independently; no lane ever reads another’s state. At least 1, and at most 1024.
seed: u64Seed of the whole stream. Lane i derives its own stream from it, so
changing partitions reshuffles which lane mints which order but
leaves each lane reproducible.
tick_interval: DurationHow often a lane releases a batch. 0s means unthrottled: the
lane generates as fast as the pipeline consumes, which is what a
throughput measurement wants and what a demo does not.
events_per_tick: u32Events released per lane per tick. Ignored when unthrottled. At least 1.
count: Option<u64>Stop after this many events across all lanes, then drain the pipeline to a clean exit. Absent means the stream never ends.
clock: ClockWhere event timestamps come from.
epoch_ms: i64Base instant for the fixed clock, in milliseconds since the Unix
epoch. Ignored by the wall clock.
Implementations§
Source§impl DatagenSourceConfig
impl DatagenSourceConfig
Sourcepub fn from_component_config(
section: &ComponentConfig,
) -> Result<Self, ConfigError>
pub fn from_component_config( section: &ComponentConfig, ) -> Result<Self, ConfigError>
Deserialize and validate from the pipeline’s opaque component section.
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Cross-field validation.
Trait Implementations§
Source§impl Clone for DatagenSourceConfig
impl Clone for DatagenSourceConfig
Source§fn clone(&self) -> DatagenSourceConfig
fn clone(&self) -> DatagenSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more