Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Event struct to allow compressing multiple recurring events in to a single event #4206

Merged
merged 1 commit into from Feb 6, 2015

Conversation

saad-ali
Copy link
Member

@saad-ali saad-ali commented Feb 6, 2015

In types.go modify the Event struct to:

  • Change Timestamp to InitialTimestamp
  • Add a LastSeenTimeStamp field (by default it will have the same value as InitialTimeStamp)
  • Add a Count field (by default it will be 1)

This implements the second item from the design proposal in #4073, compressing duplicate events.

InitialTimestamp util.Time `json:"initialTimestamp,omitempty"`

// The time at which the most recent occurance of this event was recorded.
LastSeenTimestamp util.Time `json:"initialTimestamp,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your JSON tag is wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

… to a single event.

# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
#   pkg/api/v1beta1/types.go
#   pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_DESCRIPTION
@saad-ali
Copy link
Member Author

saad-ali commented Feb 6, 2015

Feedback addressed. Comments in line. PTAL.

@thockin
Copy link
Member

thockin commented Feb 6, 2015

LGTM, modulo docs, which could be this OR in the followup.

@dchen1107
Copy link
Member

LGTM.

dchen1107 added a commit that referenced this pull request Feb 6, 2015
Modify Event struct to allow compressing multiple recurring events in to a single event
@dchen1107 dchen1107 merged commit 8eeb2d1 into kubernetes:master Feb 6, 2015
@saad-ali saad-ali deleted the modifyEventStruct branch February 6, 2015 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants