2016-12-21 02:16:29 -06:00
|
|
|
package models
|
|
|
|
|
2017-01-31 02:00:36 -06:00
|
|
|
import (
|
|
|
|
"github.com/grafana/grafana/pkg/components/null"
|
|
|
|
)
|
2016-12-21 02:16:29 -06:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|