Struct kube_runtime::events::Event
source · [−]pub struct Event {
pub type_: EventType,
pub reason: String,
pub note: Option<String>,
pub action: String,
pub secondary: Option<ObjectReference>,
}
Expand description
Minimal event type for publishing through Recorder::publish
.
All string fields must be human readable.
Fields
type_: EventType
The event severity.
Shows up in kubectl describe
as Type
.
reason: String
The short reason explaining why the action
was taken.
This must be at most 128 characters, and is often PascalCased. Shows up in kubectl describe
as Reason
.
note: Option<String>
A optional description of the status of the action
.
This must be at most 1kB in size. Shows up in kubectl describe
as Message
.
action: String
The action that was taken (either successfully or unsuccessfully) against main object
This must be at most 128 characters. It does not currently show up in kubectl describe
.
secondary: Option<ObjectReference>
Optional secondary object related to the main object
Some events are emitted for actions that affect multiple objects.
secondary
can be populated to capture this detail.
For example: the event concerns a Deployment
and it affects the current ReplicaSet
underneath it.
You would therefore populate events
using the object reference of the ReplicaSet
.
Set secondary
to None
, instead, if the event affects only the object whose reference
you passed to Recorder::new
.
Naming note
secondary
is mapped to related
in
Events API
.
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more