Struct kube_runtime::events::Event[][src]

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more