You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

queue.go 320 B

3 years ago
123456789101112131415161718
  1. package queue
  2. import (
  3. "time"
  4. "github.com/ccfos/nightingale/v6/alert/astats"
  5. "github.com/toolkits/pkg/container/list"
  6. )
  7. var EventQueue = list.NewSafeListLimited(10000000)
  8. func ReportQueueSize(stats *astats.Stats) {
  9. for {
  10. time.Sleep(time.Second)
  11. stats.GaugeAlertQueueSize.Set(float64(EventQueue.Len()))
  12. }
  13. }