Simplify RESP Parsing and Redis Channel Handlers
Motivation:
As it stands, the parsing / encoding implementations for RESP was directly tied to the NIO Channel Handlers.
Unit tests were sloppily spread across multiple files and it made it difficult to explicitly separate out the Channel Handler behavior from the RESP specification implementation.
Modifications:
- Add:
RESPTranslator
enum helper object with static methods that only handles RESP parsing / encoding - Rename:
RESPEncoder
toRedisMessageEncoder
- Rename:
RESPDecoder
toRedisByteDecoder
Results:
It should be easier to understand what type is intended to be used as part of a NIO channel pipeline while still having a direct way of parsing / encoding between Swift types and the RESP specification.
Unit tests should be more maintainable as well.