Skip to content

Commit

Permalink
format code struct and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Xingcai Zhang committed Nov 10, 2017
1 parent e1a9012 commit b16a6dc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions instrumentation/events-redesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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"
)
Expand Down

0 comments on commit b16a6dc

Please sign in to comment.