pub struct SingerSourceConfig {
pub executable: String,
pub args: Vec<String>,
pub tap_config: Value,
pub catalog: Option<Value>,
pub stream: String,
pub state_key: Option<String>,
pub flush_on_state: bool,
pub idle_timeout_secs: Option<u64>,
pub on_malformed: MalformedPolicy,
}Expand description
Fields§
§executable: StringThe tap executable to run (looked up on PATH, or an absolute path),
e.g. tap-github or /opt/taps/tap-csv.
args: Vec<String>Extra positional/flag arguments appended after faucet’s own
--config / --catalog / --state flags.
tap_config: ValueThe tap’s configuration object. faucet’s loader has already resolved any
${secret:…} references before this reaches the source; it is
materialized to a private temp file and passed as --config.
catalog: Option<Value>Optional Singer catalog object, passed as --catalog when present.
Selects streams/fields; required by most SDK-based taps.
stream: StringThe single stream to emit records for. RECORD messages for any other stream are dropped (v0 is single-stream).
state_key: Option<String>State-store key for the resume bookmark. Defaults to
singer:{executable}:{stream} when unset.
flush_on_state: boolFlush the current page whenever the tap emits a STATE message (so the
pipeline can checkpoint at the tap’s own commit points). Default true.
idle_timeout_secs: Option<u64>Abort the run if no line arrives from the tap within this many seconds.
None (default) waits indefinitely.
on_malformed: MalformedPolicyHow to handle a line that is not valid Singer JSON. Default
MalformedPolicy::Skip.
Implementations§
Source§impl SingerSourceConfig
impl SingerSourceConfig
Sourcepub fn new(executable: impl Into<String>, stream: impl Into<String>) -> Self
pub fn new(executable: impl Into<String>, stream: impl Into<String>) -> Self
Convenience constructor for the two required fields; other fields take their serde defaults.
Sourcepub fn effective_state_key(&self) -> String
pub fn effective_state_key(&self) -> String
The effective state-store key: the configured state_key, or the
derived default singer:{executable}:{stream}.
The derived key is sanitized so a path-style executable (e.g.
/opt/taps/tap-csv) still yields a valid state key — validate_state_key
only permits [A-Za-z0-9_\-:.], so any other character (notably /) is
replaced with _.
Trait Implementations§
Source§impl Clone for SingerSourceConfig
impl Clone for SingerSourceConfig
Source§fn clone(&self) -> SingerSourceConfig
fn clone(&self) -> SingerSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SingerSourceConfig
impl Debug for SingerSourceConfig
Source§impl<'de> Deserialize<'de> for SingerSourceConfig
impl<'de> Deserialize<'de> for SingerSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SingerSourceConfig
impl JsonSchema for SingerSourceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more