pub struct WebhookConfig {Show 13 fields
pub id: String,
pub kind: String,
pub url: String,
pub method: Option<String>,
pub headers: HashMap<String, String>,
pub body: Option<String>,
pub timeout: Option<Duration>,
pub retry: Option<RetryConfig>,
pub rate_limit: Option<RateLimitConfig>,
pub scope: Option<ScopeConfig>,
pub queue_size: Option<usize>,
pub tls: Option<WebhookTlsConfig>,
pub signing: Option<SigningConfig>,
}Expand description
One webhook’s YAML config block.
Fields§
§id: StringStable identifier; used as the metric label and in config errors.
kind: Stringdetection or correlation. Deserialized as a free-form string so an
unknown value (e.g. incident) produces the forward-looking error
rather than a generic serde “unknown variant”.
url: StringTarget URL template (${detection.*} / ${correlation.*} / ${ENV}).
method: Option<String>HTTP method. Defaults to POST.
headers: HashMap<String, String>Header templates. Values are rendered per result (identity escaping).
body: Option<String>Request body template. Rendered with JSON-string escaping so interpolated values cannot break the document.
timeout: Option<Duration>Per-request timeout. Accepts humantime strings (5s, 200ms).
retry: Option<RetryConfig>Retry tuning. Overrides the daemon’s --sink-* delivery defaults.
rate_limit: Option<RateLimitConfig>Optional per-entry rate limit (token bucket).
scope: Option<ScopeConfig>Optional scope filter (same axes as enrichers: rules/tags/levels).
queue_size: Option<usize>Bounded queue depth. Defaults to DEFAULT_WEBHOOK_QUEUE_SIZE.
tls: Option<WebhookTlsConfig>Optional TLS material for the endpoint: a custom CA bundle and/or a client identity for mutual TLS. Omit it to use the system roots (the common case for public services like Slack).
signing: Option<SigningConfig>Optional HMAC request signing. Adds signature headers a receiving
endpoint can verify; see SigningConfig.
Trait Implementations§
Source§impl Clone for WebhookConfig
impl Clone for WebhookConfig
Source§fn clone(&self) -> WebhookConfig
fn clone(&self) -> WebhookConfig
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 WebhookConfig
impl Debug for WebhookConfig
Source§impl<'de> Deserialize<'de> for WebhookConfig
impl<'de> Deserialize<'de> for WebhookConfig
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>,
Auto Trait Implementations§
impl Freeze for WebhookConfig
impl RefUnwindSafe for WebhookConfig
impl Send for WebhookConfig
impl Sync for WebhookConfig
impl Unpin for WebhookConfig
impl UnsafeUnpin for WebhookConfig
impl UnwindSafe for WebhookConfig
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more