infoc.go 508 B

12345678910111213141516171819202122232425
  1. package service
  2. import (
  3. "go-common/app/interface/openplatform/monitor-end/model"
  4. "go-common/library/log"
  5. "go-common/library/log/infoc"
  6. )
  7. // writeInfoc
  8. func (s *Service) infocproc() {
  9. var (
  10. collectInfoc = infoc.New(s.c.CollectInfoc)
  11. )
  12. for {
  13. i, ok := <-s.infoCh
  14. if !ok {
  15. log.Warn("infoc proc exit")
  16. return
  17. }
  18. switch l := i.(type) {
  19. case model.CollectParams:
  20. collectInfoc.Info(l.Source, l.Product, l.Event, l.SubEvent, l.Code, l.ExtJSON, l.Mid, l.IP, l.Buvid, l.UserAgent)
  21. }
  22. }
  23. }