update.go 417 B

123456789101112131415161718192021
  1. package metric
  2. import (
  3. "time"
  4. )
  5. type UpdateSet struct {
  6. Timestamp time.Time `json:"timestamp"`
  7. Updates []Update `json:"updates"`
  8. }
  9. type Update struct {
  10. Name string `json:"name"`
  11. Labels map[string]string `json:"labels"`
  12. Value float64 `json:"value"`
  13. AdditionalInfo map[string]string `json:"additionalInfo"`
  14. }
  15. type Updater interface {
  16. Update(*UpdateSet)
  17. }