pub struct SigningEventSink { /* private fields */ }Expand description
EventSink wrapper that signs each emitted CloudEvent and forwards a
transport-wrapper CloudEvent of type SIGNED_ENVELOPE_TRANSPORT_TYPE.
Implementations§
Source§impl SigningEventSink
impl SigningEventSink
Sourcepub fn from_env(inner: Arc<dyn EventSink>) -> Arc<dyn EventSink> ⓘ
pub fn from_env(inner: Arc<dyn EventSink>) -> Arc<dyn EventSink> ⓘ
Parse CELLOS_EVENT_SIGNING + CELLOS_EVENT_SIGNING_KID +
CELLOS_EVENT_SIGNING_KEY_BASE64 and return a wrapped sink if all
three are valid, otherwise return inner unwrapped.
Backwards-compatible thin wrapper over
SigningEventSink::from_env_with_warnings for callers that don’t
need to surface the structured warnings (existing in-module unit
tests, the sink_composition_chain integration test). Composition
root MUST use from_env_with_warnings so misconfig is observable
under CELLOS_STRICT_CONFIG=1 (U1-04).
Sourcepub fn from_env_with_warnings(
inner: Arc<dyn EventSink>,
) -> (Arc<dyn EventSink>, Vec<EventSigningConfigWarning>)
pub fn from_env_with_warnings( inner: Arc<dyn EventSink>, ) -> (Arc<dyn EventSink>, Vec<EventSigningConfigWarning>)
Same parsing as SigningEventSink::from_env but additionally returns
a Vec<EventSigningConfigWarning> capturing every WARN-and-fall-back
decision. The composition root threads these into the supervisor’s
StartupConfigWarnings accumulator so a misconfigured event_signing
triggers CELLOS_STRICT_CONFIG=1 startup failure (U1-04 / reviewer
wave 2 finding bebc77b) rather than silently degrading to passthrough.
Each disable path also emits the legacy tracing::warn! so log-based
alerting keeps working unchanged.
Trait Implementations§
Source§impl EventSink for SigningEventSink
impl EventSink for SigningEventSink
Auto Trait Implementations§
impl Freeze for SigningEventSink
impl !RefUnwindSafe for SigningEventSink
impl Send for SigningEventSink
impl Sync for SigningEventSink
impl Unpin for SigningEventSink
impl UnsafeUnpin for SigningEventSink
impl !UnwindSafe for SigningEventSink
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> 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