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_: EventTypeThe event severity.
Shows up in kubectl describe as Type.
reason: StringThe short reason explaining why the action was taken.
This must be at most 128 characters, generally in PascalCase. 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: StringThe 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.
A common convention is a short identifier of the action that caused the outcome described in reason.
Usually denoted in PascalCase.
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 Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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