pub enum EventKind {
BreakerOpened,
BreakerHalfOpen,
BreakerClosed,
EndpointEjected,
EndpointRecovered,
ConfigPublished,
ConfigRejected,
QuotaNearLimit,
CanaryPromoted,
CanaryRolledBack,
ProbeFailed,
ProbeRecovered,
}Expand description
Every event kind the gateway emits (DW-044). Closed set: webhook
events lists are validated against EventKind::from_config.
Variants§
BreakerOpened
A per-upstream circuit breaker moved closed -> open. Payload: upstream, detail (the rule that tripped).
BreakerHalfOpen
An open breaker’s cooling-off elapsed: the next request becomes a half-open probe. Payload: upstream.
BreakerClosed
A half-open probe succeeded: the breaker closed again. Payload: upstream.
EndpointEjected
Passive or active health ejected an endpoint from rotation. Payload: upstream, endpoint.
EndpointRecovered
An ejected endpoint recovered (successful probe or fail-open success) and is back in rotation. Payload: upstream, endpoint.
ConfigPublished
A config generation was validated, compiled, and published. Payload: generation, content_hash, route_count.
ConfigRejected
A config candidate was rejected (validation or compile failure); the previously published generation keeps serving. Payload: issue_count, generation (the one still running).
QuotaNearLimit
A consumer’s request budget crossed the near-limit threshold (80% of the window’s cap; DW-033). Payload: consumer, detail (the budget: “daily” or “monthly”), used, limit. Edge-triggered once per (consumer, budget, window): the SECOND crossing inside one window is not re-emitted, and the counter resets with the window itself.
CanaryPromoted
A canary group was promoted (DW-091): the auto-canary controller increased the canary weight. Payload: canary_group, canary_action, canary_weight, canary_metric_value.
CanaryRolledBack
A canary group was rolled back (DW-091): the auto-canary controller decreased the canary weight (or rolled it to 0 on severe regression). Payload: canary_group, canary_action, canary_weight, canary_metric_value.
ProbeFailed
DP-10 (#238): a synthetic probe crossed the failure threshold and entered an alerting state. Edge-triggered: subsequent consecutive failures do not re-fire. Payload: route, status, latency_ms, detail.
ProbeRecovered
DP-10 (#238): a previously-alerting synthetic probe recovered (a successful probe after an alert). Payload: route, status, latency_ms.
Implementations§
Source§impl EventKind
impl EventKind
Sourcepub const ALL: &'static [EventKind]
pub const ALL: &'static [EventKind]
The closed set, in display order. The source of webhook events
validation and of every doc list — keep the two in lockstep.
Sourcepub fn is_critical(self) -> bool
pub fn is_critical(self) -> bool
REL-14 (#249): whether this event kind is “critical” and should be persisted to the WAL before emission. Critical events are the ones an operator or controller needs for post-incident investigation and fleet-state reconstruction: breaker transitions, endpoint ejections/recoveries, config publish/reject, quota near-limit, and canary promotions/rollbacks. Probe events are excluded (high-volume, operational not critical).
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Stable wire/config spelling (serde’s snake_case form, spelled out so it can be used in labels and validation messages without serializing).
Sourcepub fn from_config(value: &str) -> Option<EventKind>
pub fn from_config(value: &str) -> Option<EventKind>
Parse one gateway.webhooks[].events[] entry. Unknown spellings
are None (validation turns them into an issue naming the
accepted set).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventKind
impl<'de> Deserialize<'de> for EventKind
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>,
impl Copy for EventKind
impl Eq for EventKind
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnwindSafe for EventKind
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§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 reference§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 pointer§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 pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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,
§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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