use a standard Event Dump() function
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
f6018c0960
commit
0a5aa8e447
|
@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue