2019-01-31 00:02:38 +00:00
|
|
|
package data
|
|
|
|
|
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-08 04:04:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Alert struct {
|
2019-03-10 04:41:23 +00:00
|
|
|
Title string
|
|
|
|
Text string
|
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
|
|
|
}
|