pub struct PipelineConfig {
pub pipeline: PipelineSection,
pub checkpoint: CheckpointSection,
pub backpressure: BackpressureSection,
pub metrics: MetricsSection,
pub source: ComponentConfig,
pub deserializer: Option<ComponentConfig>,
pub sink: Option<ComponentConfig>,
pub sinks: Option<BTreeMap<String, ComponentConfig>>,
}Expand description
Root of a pipeline’s configuration file.
One process runs one pipeline; one file configures one process.
Fields§
§pipeline: PipelineSectionIdentity and thread budget.
checkpoint: CheckpointSectionWatermark commit policy.
backpressure: BackpressureSectionIn-flight budget and pause/resume hysteresis.
metrics: MetricsSectionExporter selection and observability knobs.
source: ComponentConfigThe source component (opaque body).
deserializer: Option<ComponentConfig>Optional deserializer component (opaque body). Sources that emit ready-made records need none.
sink: Option<ComponentConfig>Single sink component (opaque body) — sugar for the common one-sink
case, addressed as "default". Mutually exclusive with sinks.
Resolve via sink_config.
sinks: Option<BTreeMap<String, ComponentConfig>>Named sinks for a multi-sink split: a name -> component map, each an
ordinary single-key component (clickhouse: {...}). Mutually exclusive
with sink. Resolve via sink_config.
Implementations§
Source§impl PipelineConfig
impl PipelineConfig
Sourcepub fn from_str(text: &str) -> Result<Self, ConfigError>
pub fn from_str(text: &str) -> Result<Self, ConfigError>
Load from YAML text: interpolate ${VAR} forms against the process
environment, parse, and validate.
Sourcepub fn from_path(path: &Path) -> Result<Self, ConfigError>
pub fn from_path(path: &Path) -> Result<Self, ConfigError>
Load from a YAML file (read, interpolate, parse, validate).
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Cross-field validation, run automatically by the loaders. Public so
programmatically built configs (tests, spate-test) get the same
checks.
Sourcepub fn sink_config(&self, name: &str) -> Result<&ComponentConfig, ConfigError>
pub fn sink_config(&self, name: &str) -> Result<&ComponentConfig, ConfigError>
The component config for the sink named name. The single-sink sink:
form is addressed as "default". A connector factory calls this once
per sink to build it.
§Errors
ConfigError::Validation if no sink is configured under name.
Sourcepub fn sink_names(&self) -> Vec<String>
pub fn sink_names(&self) -> Vec<String>
The configured sink names, sorted. A single-sink config reports
["default"].