pub struct SpoolEntry {
pub schema_version: u32,
pub delivery_id: String,
pub source: String,
pub event: String,
pub headers: BTreeMap<String, String>,
pub body_b64: String,
pub provenance: Provenance,
pub received_at_unix_ms: u64,
pub attempts: u32,
pub last_error: Option<String>,
pub last_attempt_at_unix_ms: Option<u64>,
}Expand description
One spooled delivery.
Why: holds everything a target needs to act on the delivery and everything
an operator needs to diagnose a stuck one, so a pending entry is
self-describing without console being alive to explain it.
What: the raw body is base64 so the JSON container cannot corrupt bytes the
HMAC was computed over; the target decodes it and may re-verify
independently. attempts and last_error are the durable record of relay
failure that replaces the tracing::warn! both current handlers use.
Test: spool_persists_and_reloads_an_entry_byte_exact.
Fields§
§schema_version: u32Schema version; see SPOOL_SCHEMA_VERSION.
delivery_id: StringGitHub’s X-GitHub-Delivery GUID, or a synthesised stand-in.
source: StringWhich target this delivery is bound for (review / analyze).
event: StringThe X-GitHub-Event value.
headers: BTreeMap<String, String>The request headers, lowercased, as received.
body_b64: StringThe raw request body, base64-encoded — byte-exact, never re-serialised.
provenance: ProvenanceWhat console verified before spooling.
received_at_unix_ms: u64When console accepted the delivery.
attempts: u32How many relay attempts have failed. 0 on a freshly spooled entry.
last_error: Option<String>Why the most recent attempt failed, if one has.
last_attempt_at_unix_ms: Option<u64>When the most recent attempt ran.
Trait Implementations§
Source§impl Clone for SpoolEntry
impl Clone for SpoolEntry
Source§fn clone(&self) -> SpoolEntry
fn clone(&self) -> SpoolEntry
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 SpoolEntry
impl Debug for SpoolEntry
Source§impl<'de> Deserialize<'de> for SpoolEntry
impl<'de> Deserialize<'de> for SpoolEntry
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 Eq for SpoolEntry
Source§impl PartialEq for SpoolEntry
impl PartialEq for SpoolEntry
Source§impl Serialize for SpoolEntry
impl Serialize for SpoolEntry
impl StructuralPartialEq for SpoolEntry
Auto Trait Implementations§
impl Freeze for SpoolEntry
impl RefUnwindSafe for SpoolEntry
impl Send for SpoolEntry
impl Sync for SpoolEntry
impl Unpin for SpoolEntry
impl UnsafeUnpin for SpoolEntry
impl UnwindSafe for SpoolEntry
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
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
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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