Skip to main content

feldera_types/transport/
url.rs

1use serde::{Deserialize, Serialize};
2use utoipa::ToSchema;
3
4/// Configuration for reading data from an HTTP or HTTPS URL with
5/// `UrlInputTransport`.
6#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
7pub struct UrlInputConfig {
8    /// URL.
9    pub path: String,
10
11    /// Timeout before disconnection when paused, in seconds.
12    ///
13    /// If the pipeline is paused, or if the input adapter reads data faster
14    /// than the pipeline can process it, then the controller will pause the
15    /// input adapter. If the input adapter stays paused longer than this
16    /// timeout, it will drop the network connection to the server. It will
17    /// automatically reconnect when the input adapter starts running again.
18    #[serde(default = "default_pause_timeout")]
19    pub pause_timeout: u32,
20}
21
22const fn default_pause_timeout() -> u32 {
23    60
24}