use a standard Event Dump() function

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-11 13:20:24 -07:00
parent f6018c0960
commit 0a5aa8e447
1 changed files with 2 additions and 9 deletions

View File

@ -10,19 +10,12 @@ import "bytes"
import "github.com/golang/protobuf/proto" import "github.com/golang/protobuf/proto"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.com/wit/witProtobuf"
// sits on the channel waiting for Events
func processEvents(mychannel chan *pb.Event) { func processEvents(mychannel chan *pb.Event) {
for { for {
message := <-mychannel message := <-mychannel
log.Println("processEvents() on channel recieved a message") log.Println("processEvents() on channel recieved a message")
ReadReceivedData(message) pb.DumpEventData(message)
}
}
func ReadReceivedData(data *pb.Event) {
msgItems := data.GetResults()
fmt.Println("Receiving data...")
for _, item := range msgItems {
fmt.Println(item)
} }
} }