mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 02:38:12 +00:00
This commit adds type information to events.
This addresses issue #15624.
This commit is contained in:
@@ -1781,6 +1781,14 @@ type EventSource struct {
|
||||
Host string `json:"host,omitempty"`
|
||||
}
|
||||
|
||||
// Valid values for event types (new types could be added in future)
|
||||
const (
|
||||
// Information only and will not cause any problems
|
||||
EventTypeNormal string = "Normal"
|
||||
// These events are to warn that something might go wrong
|
||||
EventTypeWarning string = "Warning"
|
||||
)
|
||||
|
||||
// Event is a report of an event somewhere in the cluster.
|
||||
// TODO: Decide whether to store these separately or with the object they apply to.
|
||||
type Event struct {
|
||||
@@ -1811,6 +1819,9 @@ type Event struct {
|
||||
|
||||
// The number of times this event has occurred.
|
||||
Count int `json:"count,omitempty"`
|
||||
|
||||
// Type of this event (Normal, Warning), new types could be added in the future.
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// EventList is a list of events.
|
||||
|
||||
Reference in New Issue
Block a user