swift-server / RediStack

Non-blocking, event-driven Swift client for Redis.
http://swiftpackageindex.com/swift-server/RediStack/documentation
Apache License 2.0
141 stars 20 forks source link

Add RedisCommandEncoder #69

Closed fabianfett closed 1 year ago

fabianfett commented 1 year ago

We want to be able to efficiently encode Redis commands that are sent to a server. This patch adds a new RedisCommandEncoder that allows us to efficiently create Redis commands without needing to go through RESP representations, that may require us to create Arrays. Further it introduces a RESP3BlobStringEncodable that must be implement to send blob strings using RedisCommandEncoder. This patch also adds implementations for String and ByteBuffer for the new RESP3BlobStringEncodable protocol.