Skip to content

Commit

Permalink
Add new message set reader to replace the old.
Browse files Browse the repository at this point in the history
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
Collin Van Dyck committed Oct 5, 2021
1 parent 4360e53 commit c2f08ec
Showing 1 changed file with 520 additions and 0 deletions.
Loading

0 comments on commit c2f08ec

Please sign in to comment.