feat(live): minor progress on stream manager

This commit is contained in:
Torkel Ödegaard
2016-12-21 09:16:29 +01:00
parent b7827962dc
commit 8bccbdafd2
2 changed files with 101 additions and 0 deletions

27
pkg/models/streams.go Normal file
View 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)
}