go-common/app/interface/openplatform/monitor-end/service/infoc.go

26 lines
508 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package service
import (
"go-common/app/interface/openplatform/monitor-end/model"
"go-common/library/log"
"go-common/library/log/infoc"
)
// writeInfoc
func (s *Service) infocproc() {
var (
collectInfoc = infoc.New(s.c.CollectInfoc)
)
for {
i, ok := <-s.infoCh
if !ok {
log.Warn("infoc proc exit")
return
}
switch l := i.(type) {
case model.CollectParams:
collectInfoc.Info(l.Source, l.Product, l.Event, l.SubEvent, l.Code, l.ExtJSON, l.Mid, l.IP, l.Buvid, l.UserAgent)
}
}
}