pub enum NotificationTarget {
Webhook {
url: String,
},
Slack {
webhook_url: String,
channel: String,
},
}Expand description
Where an escalation notification is delivered.
Both variants are plain HTTP POSTs, delivered with the engine’s shared
retry/backoff configuration. A failed delivery is logged and never blocks
the timer reset.
§Examples
use ironflow_engine::config::NotificationTarget;
let target = NotificationTarget::Webhook {
url: "https://example.com/sla".to_string(),
};
let json = serde_json::to_string(&target).expect("serialize");
assert!(json.contains("webhook"));Variants§
Webhook
Plain HTTP POST of the escalation event as JSON.
Slack
Slack incoming webhook; channel is echoed in the payload.
Trait Implementations§
Source§impl Clone for NotificationTarget
impl Clone for NotificationTarget
Source§impl Debug for NotificationTarget
impl Debug for NotificationTarget
Source§impl<'de> Deserialize<'de> for NotificationTarget
impl<'de> Deserialize<'de> for NotificationTarget
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NotificationTarget
Source§impl PartialEq for NotificationTarget
impl PartialEq for NotificationTarget
Source§impl Serialize for NotificationTarget
impl Serialize for NotificationTarget
impl StructuralPartialEq for NotificationTarget
Auto Trait Implementations§
impl Freeze for NotificationTarget
impl RefUnwindSafe for NotificationTarget
impl Send for NotificationTarget
impl Sync for NotificationTarget
impl Unpin for NotificationTarget
impl UnsafeUnpin for NotificationTarget
impl UnwindSafe for NotificationTarget
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.