pub struct Event {Show 15 fields
pub metadata: Option<ObjectMeta>,
pub involved_object: Option<ObjectReference>,
pub reason: Option<String>,
pub message: Option<String>,
pub source: Option<EventSource>,
pub first_timestamp: Option<Time>,
pub last_timestamp: Option<Time>,
pub count: Option<i32>,
pub type: Option<String>,
pub event_time: Option<MicroTime>,
pub series: Option<EventSeries>,
pub action: Option<String>,
pub related: Option<ObjectReference>,
pub reporting_component: Option<String>,
pub reporting_instance: Option<String>,
}
Expand description
Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
Fields§
§metadata: Option<ObjectMeta>
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
involved_object: Option<ObjectReference>
The object that this event is about.
reason: Option<String>
This should be a short, machine understandable string that gives the reason for the transition into the object’s current status. TODO: provide exact specification for format. +optional
message: Option<String>
A human-readable description of the status of this operation. TODO: decide on maximum length. +optional
source: Option<EventSource>
The component reporting this event. Should be a short machine understandable string. +optional
first_timestamp: Option<Time>
The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) +optional
last_timestamp: Option<Time>
The time at which the most recent occurrence of this event was recorded. +optional
count: Option<i32>
The number of times this event has occurred. +optional
type: Option<String>
Type of this event (Normal, Warning), new types could be added in the future +optional
event_time: Option<MicroTime>
Time when this Event was first observed. +optional
series: Option<EventSeries>
Data about the Event series this event represents or nil if it’s a singleton Event. +optional
action: Option<String>
What action was taken/failed regarding to the Regarding object. +optional
Optional secondary object for more complex actions. +optional
reporting_component: Option<String>
Name of the controller that emitted this Event, e.g. kubernetes.io/kubelet
.
+optional
reporting_instance: Option<String>
ID of the controller instance, e.g. kubelet-xyzf
.
+optional
Implementations§
Source§impl Event
impl Event
Sourcepub fn reason(&self) -> &str
pub fn reason(&self) -> &str
Returns the value of reason
, or the default value if reason
is unset.
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the value of message
, or the default value if message
is unset.
Sourcepub fn action(&self) -> &str
pub fn action(&self) -> &str
Returns the value of action
, or the default value if action
is unset.
Sourcepub fn reporting_component(&self) -> &str
pub fn reporting_component(&self) -> &str
Returns the value of reporting_component
, or the default value if reporting_component
is unset.
Sourcepub fn reporting_instance(&self) -> &str
pub fn reporting_instance(&self) -> &str
Returns the value of reporting_instance
, or the default value if reporting_instance
is unset.
Trait Implementations§
Source§impl Message for Event
impl Message for Event
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Resource for Event
impl Resource for Event
Source§const API_VERSION: &'static str = "v1"
const API_VERSION: &'static str = "v1"
Resource::GROUP
and Resource::VERSION
(eg "apiextensions.k8s.io/v1beta1"
)
or just the version for resources without a group (eg "v1"
). Read more