summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXingcai Zhang <zhangxingcai@ghostcloud.cn>2017-11-10 22:24:40 +0800
committerXingcai Zhang <zhangxingcai@ghostcloud.cn>2017-11-10 22:24:40 +0800
commite4db35f630c56dda6fad1820956bf17c65c91b82 (patch)
tree0bfb5438c2efad11fa2ee7c8b8d42d87666a0e24
parent98d60cc0d29d7b1b6f2b03dc77045794a4962943 (diff)
format code struct and comments
-rw-r--r--contributors/design-proposals/instrumentation/events-redesign.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/contributors/design-proposals/instrumentation/events-redesign.md b/contributors/design-proposals/instrumentation/events-redesign.md
index 4355e1ad..6540d61f 100644
--- a/contributors/design-proposals/instrumentation/events-redesign.md
+++ b/contributors/design-proposals/instrumentation/events-redesign.md
@@ -100,13 +100,13 @@ We'd like to propose following structure in Events object in the new events API
```golang
type Event struct {
-// <type and object metadata>
+ // <type and object metadata>
// Time when this Event was first observed.
EventTime metav1.MicroTime
// Data about the Event series this event represents or nil if it's
-// a singleton Event.
+ // a singleton Event.
// +optional
Series *EventSeries
@@ -123,7 +123,7 @@ type Event struct {
Reason string
// The object this Event is “about”. In most cases it's the object that the
-// given controller implements.
+ // given controller implements.
// +optional
Regarding ObjectReference
@@ -132,24 +132,24 @@ type Event struct {
Related *ObjectReference
// Human readable description of the Event. Possibly discarded when and
-// Event series is being deduplicated.
+ // Event series is being deduplicated.
// +optional
Note string
// Type of this event (Normal, Warning), new types could be added in the
-// future.
-// +optional
-Type string
+ // future.
+ // +optional
+ Type string
}
type EventSeries struct {
-Count int32
-LastObservedTime MicroTime
-State EventSeriesState
+ Count int32
+ LastObservedTime MicroTime
+ State EventSeriesState
}
const (
-EventSeriesStateOngoing = "Ongoing"
+ EventSeriesStateOngoing = "Ongoing"
EventSeriesStateFinished = "Finished"
EventSeriesStateUnknown = "Unknown"
)