pub struct EventPayload {Show 18 fields
pub upstream: Option<String>,
pub endpoint: Option<String>,
pub detail: Option<&'static str>,
pub generation: Option<u64>,
pub content_hash: Option<u64>,
pub route_count: Option<usize>,
pub issue_count: Option<usize>,
pub consumer: Option<String>,
pub used: Option<u64>,
pub limit: Option<u64>,
pub canary_group: Option<String>,
pub canary_action: Option<String>,
pub canary_weight: Option<u64>,
pub canary_metric_value: Option<f64>,
pub route: Option<String>,
pub status: Option<u16>,
pub latency_ms: Option<u64>,
pub probe_detail: Option<String>,
}Expand description
The payload of one event: a flat set of bounded labels and numbers. Every field is optional (each event kind sets the fields it owns); unset fields are omitted from the serialized envelope, and there is deliberately NO free-form/detail-string-from-input field — an envelope must stay small and safe to hand to a third party.
Fields§
§upstream: Option<String>Upstream name (breaker and ejection events).
endpoint: Option<String>Endpoint address:port (ejection events).
detail: Option<&'static str>The rule that tripped a breaker (“consecutive_failures” or “error_ratio”) or the probe outcome that closed it — a static string, never operator- or request-derived text.
generation: Option<u64>Published generation number (config events).
content_hash: Option<u64>Per-process change-detection token of the published config (config_published; same caveats as the snapshot content hash).
route_count: Option<usize>Routes in the published generation (config_published).
issue_count: Option<usize>Validation issues counted on a rejected config (config_rejected).
consumer: Option<String>Config-declared consumer name (quota_near_limit, DW-033). Budgets attach to CONFIG consumer records only in this edition, so this is a config label, never a request-derived or admin-entered string (see the module docs’ payload-safety contract).
used: Option<u64>Requests counted in the budget’s current window (quota_near_limit).
limit: Option<u64>The budget’s configured cap (quota_near_limit).
canary_group: Option<String>Config-declared canary group name (canary_promoted / canary_rolled_back, DW-091): the service name or AI alias the auto-canary controller adjusted. A config label, never request-derived.
canary_action: Option<String>The canary action that triggered the event (DW-091): “promote”, “rollback”, or “severe_regression”. A static string.
canary_weight: Option<u64>The new canary weight after the adjustment (DW-091).
canary_metric_value: Option<f64>The metric value that triggered the adjustment (DW-091).
route: Option<String>DP-10 (#238): the route name for synthetic probe events.
status: Option<u16>DP-10 (#238): the HTTP status code from the probe response.
latency_ms: Option<u64>DP-10 (#238): the probe round-trip latency in milliseconds.
probe_detail: Option<String>DP-10 (#238): dynamic error message from a failed probe (unlike
detail, this is a runtime string, not a static label).
Implementations§
Source§impl EventPayload
impl EventPayload
Sourcepub fn breaker(upstream: &str, detail: Option<&'static str>) -> Self
pub fn breaker(upstream: &str, detail: Option<&'static str>) -> Self
Payload for a breaker transition of upstream (DW-044).
Sourcepub fn endpoint(upstream: &str, endpoint: &str) -> Self
pub fn endpoint(upstream: &str, endpoint: &str) -> Self
Payload for an endpoint ejection/recovery event (DW-044).
Trait Implementations§
Source§impl Clone for EventPayload
impl Clone for EventPayload
Source§fn clone(&self) -> EventPayload
fn clone(&self) -> EventPayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventPayload
impl Debug for EventPayload
Source§impl Default for EventPayload
impl Default for EventPayload
Source§fn default() -> EventPayload
fn default() -> EventPayload
Source§impl<'de> Deserialize<'de> for EventPayloadwhere
EventPayload: Default,
impl<'de> Deserialize<'de> for EventPayloadwhere
EventPayload: Default,
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 PartialEq for EventPayload
impl PartialEq for EventPayload
Source§impl Serialize for EventPayload
impl Serialize for EventPayload
impl StructuralPartialEq for EventPayload
Auto Trait Implementations§
impl Freeze for EventPayload
impl RefUnwindSafe for EventPayload
impl Send for EventPayload
impl Sync for EventPayload
impl Unpin for EventPayload
impl UnwindSafe for EventPayload
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<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