grafana/pkg/models/streams.go
2016-12-21 09:16:29 +01:00

28 lines
491 B
Go

package models
import "gopkg.in/guregu/null.v3"
type TimePoint [2]null.Float
type TimeSeriesPoints []TimePoint
type StreamPacket struct {
Stream string `json:"stream"`
Series []StreamSeries `json:"series"`
}
type StreamSeries struct {
Name string `json:"name"`
Points TimeSeriesPoints `json:"points"`
}
type StreamInfo struct {
Name string
}
type StreamList []*StreamInfo
type StreamManager interface {
GetStreamList() StreamList
Push(data *StreamPacket)
}