Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new message set reader to replace the old.
The reader parses each message set header as it is processed, storing the header in the reader stack. The header is a struct that contains common header fields for the various message set formats, as well as composed structs for v1/v2 specific fields. The header stores the magic byte, and it's this field that is consulted before reading any messages in the current message set. The magic byte determine whether or not the v1 or v2 read routine is called each time the caller wants to read a message. Some debug logging was added, which only gets executed when the debug field is true. Note: we move this into a new message_reader.go file to separate the reader logic from the message type in message.go.
- Loading branch information