go-resp3 client is a Go implementation of the Redis RESP3 protocol. It is intended as a simple Go wrapper for Redis commands and is not going to support
- former Redis protocols (RESP3 only).
- Redis cluster protocol (allthough cluster commands are implemented) - please use Redis Cluster Proxy instead.
go get github.com/d024441/go-resp3/client
To build go-resp3 you need to have a working Go environment with version 1.13.4 or higher installed.
API documentation and documented examples can be found at https://godoc.org/github.com/d024441/go-resp3/client.
To run the driver tests and benchmarks a running Redis server (version >= 6.0) is required. For the Redis connection localhost (127.0.0.1) and the default Redis port is used. The following environment variables can be set to use alternative host and port addresses:
- Full RESP3 implementation supporting receiving attributes, streamed strings and streamed aggregate types.
- Standardized generated command interface.
- Asynchronous client with concurrent read / write supporting commands and out of band data within same connection.
- Redis pipeline support.
- Extendable via custom connection and pipeline (see https://godoc.org/github.com/d024441/go-resp3/client#ex-package--Redefine).
To simplify the command API some of the Redis commands got replaced by a set of commands:
|Redis command||Replaced by API commands|
|Bitop||BitopAnd, BitopNot, BitopOr, BitopXor|
|Object||ObjectEncoding, ObjectFreq, ObjectHelp, ObjectIdletime, ObjectRefcount|
|Pubsub||PubsubChannels, PubsubNumpat, PubsubNumsub|
|Set||Set, SetEx, SetExNx, SetExXx, SetNx, SetPx, SetPxNx, SetPxXx, SetXx|
|Slowlog||SlowlogGet, SlowlogLen, SlowlogReset|
|Xgroup||XgroupCreate, XgroupSetid, XgroupDestroy, XgroupDelconsumer, XgroupHelp|
|Xinfo||XinfoConsumers, XinfoGroups, XinfoStream, XinfoHelp|
|Zadd||Zadd, ZaddCh, ZaddNx, ZaddNxCh, ZaddXx, ZaddXxCh|
Please see the following table for deprecated Redis commands and their replacements:
|Redis command||Replaced by API command|
This is an alpha version. The client API may be subject to change until the first stable version is available.
- Complete redis command tests.