Skip to content

Commit

Permalink
feat(prompb): implement timestamp getters
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Feb 22, 2024
1 parent a5bb9bf commit 30cedaf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions internal/prompb/getter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package prompb

// GetTimestamp returns Timestamp.
func (h *Sample) GetTimestamp() int64 {
if h == nil {
return 0
}
return h.Timestamp
}

// GetTimestamp returns Timestamp.
func (h *Exemplar) GetTimestamp() int64 {
if h == nil {
return 0
}
return h.Timestamp
}

// GetTimestamp returns Timestamp.
func (h *Histogram) GetTimestamp() int64 {
if h == nil {
return 0
}
return h.Timestamp
}
File renamed without changes.

0 comments on commit 30cedaf

Please sign in to comment.