sampler-fork/data/consumer.go

28 lines
391 B
Go
Raw Normal View History

2019-01-31 00:02:38 +00:00
package data
2019-03-13 03:15:55 +00:00
import ui "github.com/sqshq/termui"
2019-03-08 04:04:46 +00:00
type Consumer struct {
SampleChannel chan Sample
AlertChannel chan Alert
2019-02-03 03:30:45 +00:00
}
type Sample struct {
Label string
Value string
2019-03-13 03:15:55 +00:00
Color *ui.Color
2019-03-08 04:04:46 +00:00
}
type Alert struct {
Title string
Text string
2019-03-13 03:15:55 +00:00
Color *ui.Color
2019-03-08 04:04:46 +00:00
}
func NewConsumer() Consumer {
return Consumer{
SampleChannel: make(chan Sample),
AlertChannel: make(chan Alert),
}
2019-01-31 00:02:38 +00:00
}