NominalStreamOpts#
- #[non_exhaustive] pub struct NominalStreamOpts#
Configuration for a
NominalDatasetStream.Marked
#[non_exhaustive]so new options can be added without a breaking change. Construct withNominalStreamOpts::defaultand customise via thewith_*methods.
Fields#
- pub max_points_per_record: usize#
Maximum submitted data points per output request. Must be greater than zero. Oversized buffers are split by the background processor.
- pub max_buffered_requests: usize#
- pub request_dispatcher_tasks: usize#
Number of threads sending requests to the consumer. Must be greater than zero.
- pub track_metrics: bool#
Emit request runtime metrics from the builder’s Core consumer. Disabled by default.
Completed request metrics piggyback on later data requests to the same dataset. Pending metrics are bounded and discarded on shutdown; no extra requests are sent. File-only streams are unaffected. Configure manually supplied consumers separately.
- pub additional_metric_channels: Vec<String>#
Channels the caller emits through the stream that carry metrics rather than data, beyond the request metrics
track_metricsemits itself. They are excluded from request latency measurements whentrack_metricsis enabled.
- pub user_agent: ProductAgent#
Program name and version at the start of the
User-Agentheader of requests from the Core consumerNominalDatasetStreamBuilderbuilds. SeeProductAgent.Consumers passed to
NominalDatasetStream::new_with_consumerkeep the agent of the clients they were built with. Build those clients withNominalApiClients::try_from_url.
Implementations#
- impl NominalStreamOpts
- pub fn with_max_points_per_record(self, max_points_per_record: usize) -> Self#
- pub fn with_max_buffered_requests(self, max_buffered_requests: usize) -> Self#
- pub fn with_request_dispatcher_tasks(self, request_dispatcher_tasks: usize) -> Self#
- pub fn with_track_metrics(self, track_metrics: bool) -> Self#
- pub fn with_additional_metric_channels(self, channels: impl IntoIterator<Item = impl Into<String>>) -> Self#
- pub fn with_user_agent(self, user_agent: ProductAgent) -> Self#
Trait implementations#
- impl Default for NominalStreamOpts
- fn default() -> Self
Auto traits: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe