pub struct EnrichConfig {
pub connector: String,
pub method: HttpMethod,
pub path: Option<String>,
pub path_logic: Option<Template>,
pub merge_path: String,
pub timeout_ms: u64,
pub on_error: EnrichErrorAction,
}Expand description
Configuration for the enrich integration function.
Enrichment calls an external service and merges the response into the message context.
Unknown keys are rejected, as for HttpCallConfig. Note that the
destination field here is merge_path and takes no alias — only
HttpCallConfig::response_path accepts output.
Fields§
§connector: StringNamed connector reference
method: HttpMethodHTTP method for the enrichment call
path: Option<String>Static path
path_logic: Option<Template>JSONLogic expression to compute path dynamically. Compiled once at
engine construction; read it through EnrichConfig::resolve_path.
merge_path: StringDot-path where enrichment data is merged into the message context
timeout_ms: u64Request timeout in milliseconds (default: 30000)
on_error: EnrichErrorActionWhat to do on enrichment failure
Implementations§
Source§impl EnrichConfig
impl EnrichConfig
Sourcepub fn resolve_path(&self, ctx: &TaskContext<'_>) -> Result<Option<String>>
pub fn resolve_path(&self, ctx: &TaskContext<'_>) -> Result<Option<String>>
Resolve the enrichment path: path_logic when compiled, otherwise the
static path. Ok(None) when neither is set.
§Errors
Trait Implementations§
Source§impl Clone for EnrichConfig
impl Clone for EnrichConfig
Source§fn clone(&self) -> EnrichConfig
fn clone(&self) -> EnrichConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more