feat(alerting): added few fields to alert rule
This commit is contained in:
1 parent
2ce9d4571c
commit
77b7cdfadb
3 files changed
+60
-9
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package alerting
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
go dispatcher()
|
||||
}
|
||||
|
||||
func dispatcher() {
|
||||
|
||||
ticker := time.NewTicker(time.Second)
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
scheduleJobs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func scheduleJobs() {
|
||||
|
||||
}
|
||||
|
||||
type Scheduler interface {
|
||||
}
|
||||
|
||||
type Executor interface {
|
||||
Execute(rule *m.AlertRule)
|
||||
}
|
||||
Reference in new issue
Block a user