示例#1
0
func parseData(ss *textio.StringStream, msgCollection *logexport.MessageCollection) {
	var logString string
	for ss.ReadString(&logString) {
		ci, err := logparser.ParseClientInfo(logString)
		if err != nil {
			fmt.Println(err)
			continue
		}
		msgCollection.AddClientInfo(ci)
	}

	if !ss.IsSuccess() {
		panic("Read error")
	}
}
示例#2
0
func sendMessage(msg *logexport.MessageCollection) {
	err := msg.SendAll()
	if err != nil {
		fmt.Println(err)
	}
}