Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
rest: add tags to task watch events
Browse files Browse the repository at this point in the history
  • Loading branch information
pittma committed Mar 22, 2016
1 parent 00093b4 commit f6acee8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mgmt/rest/rbody/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,11 @@ func (s *StreamedTaskEvent) ToJSON() string {
}

type StreamedMetric struct {
Namespace string `json:"namespace"`
Data interface{} `json:"data"`
Source string `json:"source"`
Timestamp time.Time `json:"timestamp"`
Namespace string `json:"namespace"`
Data interface{} `json:"data"`
Source string `json:"source"`
Timestamp time.Time `json:"timestamp"`
Tags map[string]string `json:"tags"`
}

type StreamedMetrics []StreamedMetric
Expand Down
1 change: 1 addition & 0 deletions mgmt/rest/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ func (t *TaskWatchHandler) CatchCollection(m []core.Metric) {
Data: m[i].Data(),
Source: m[i].Source(),
Timestamp: m[i].Timestamp(),
Tags: m[i].Tags(),
}
}
t.mChan <- rbody.StreamedTaskEvent{
Expand Down

0 comments on commit f6acee8

Please sign in to comment.