mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(live): minor progress on stream manager
This commit is contained in:
27
pkg/models/streams.go
Normal file
27
pkg/models/streams.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user