pub enum ApprovalEvent {
ApprovalRequested {
pending_id: String,
action_type: String,
namespace: String,
requested_by: String,
requested_at: String,
},
ApprovalDecided {
pending_id: String,
decision: String,
decided_by: String,
remember: String,
namespace: String,
requested_by: String,
},
}Expand description
One frame on the SSE stream.
Two variants today:
ApprovalRequested— fired when apending_actionsrow is inserted (governance gate returnedPending).ApprovalDecided— fired when an approve/reject decision is finalised (any of the three K10 transports).
Both carry the pending-action id so subscribers can round-trip back
through GET /api/v1/pending/{id} for the full row payload.
Variants§
ApprovalRequested
Fields
ApprovalDecided
Implementations§
Source§impl ApprovalEvent
impl ApprovalEvent
Sourcepub fn tenant_agent_id(&self) -> &str
pub fn tenant_agent_id(&self) -> &str
Tenant agent the event belongs to — requested_by for both
variants. Used by the SSE handler to scope broadcasts to the
originating agent (review #628 blocker C2).
Sourcepub fn tenant_namespace(&self) -> &str
pub fn tenant_namespace(&self) -> &str
Namespace the event belongs to. Used by the SSE handler in concert with K9’s permission rules to decide whether a subscriber may see a cross-agent event.
Trait Implementations§
Source§impl Clone for ApprovalEvent
impl Clone for ApprovalEvent
Source§fn clone(&self) -> ApprovalEvent
fn clone(&self) -> ApprovalEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApprovalEvent
impl Debug for ApprovalEvent
Source§impl<'de> Deserialize<'de> for ApprovalEvent
impl<'de> Deserialize<'de> for ApprovalEvent
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
Auto Trait Implementations§
impl Freeze for ApprovalEvent
impl RefUnwindSafe for ApprovalEvent
impl Send for ApprovalEvent
impl Sync for ApprovalEvent
impl Unpin for ApprovalEvent
impl UnsafeUnpin for ApprovalEvent
impl UnwindSafe for ApprovalEvent
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
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
Converts
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>
Converts
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