NominalStreamOpts#

#[non_exhaustive] pub struct NominalStreamOpts#

Configuration for a NominalDatasetStream.

Marked #[non_exhaustive] so new options can be added without a breaking change. Construct with NominalStreamOpts::default and customise via the with_* 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_request_delay: Duration#
pub max_buffered_requests: usize#
pub request_dispatcher_tasks: usize#

Number of threads sending requests to the consumer. Must be greater than zero.

pub base_api_url: String#
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_metrics emits itself. They are excluded from request latency measurements when track_metrics is enabled.

pub user_agent: ProductAgent#

Program name and version at the start of the User-Agent header of requests from the Core consumer NominalDatasetStreamBuilder builds. See ProductAgent.

Consumers passed to NominalDatasetStream::new_with_consumer keep the agent of the clients they were built with. Build those clients with NominalApiClients::try_from_url.

Implementations#

impl NominalStreamOpts
pub fn with_max_points_per_record(self, max_points_per_record: usize) -> Self#
pub fn with_max_request_delay(self, max_request_delay: Duration) -> 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_base_api_url(self, base_api_url: impl Into<String>) -> 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

Derived: Debug, Clone

Auto traits: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe