streams.go 519 B

1234567891011121314151617181920212223242526272829
  1. package models
  2. import (
  3. "github.com/grafana/grafana/pkg/components/null"
  4. )
  5. type TimePoint [2]null.Float
  6. type TimeSeriesPoints []TimePoint
  7. type StreamPacket struct {
  8. Stream string `json:"stream"`
  9. Series []StreamSeries `json:"series"`
  10. }
  11. type StreamSeries struct {
  12. Name string `json:"name"`
  13. Points TimeSeriesPoints `json:"points"`
  14. }
  15. type StreamInfo struct {
  16. Name string
  17. }
  18. type StreamList []*StreamInfo
  19. type StreamManager interface {
  20. GetStreamList() StreamList
  21. Push(data *StreamPacket)
  22. }