Skip to content

Commit f743f03

Browse files
authored
Add redis documentation (#5)
* Add redis documentation * Update README.md
1 parent 466a2fe commit f743f03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

redis/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ These ratelimiters are for usage with [Redis](https://redis.io). They're persist
44

55
These are used in many places in [Fossabot](https://fossabot.com): including but not limited to API ratelimiting, chat abuse detection, follower alert spam limiting, etc.
66

7+
## Library Agnostic
8+
9+
Given the fragmented community preferences for Redis clients in Go, this library is designed to be compatible with whatever Redis client you choose, making this library ideal for any Redis-based project you build! We achieve this through the [Adapter](adapters/adapter.go) interface - an adapter is essentially a very thin wrapper around your Redis client.
10+
11+
We provide native support for [go-redis](https://github.com/redis/go-redis) and [redigo](https://github.com/gomodule/redigo), though, you are more than welcome to add support for your own Redis client through the adapter interface. The underlying implementations are extremely simple, feel free to look at the premade ones for a reference point.
12+
713
## Example Usage
814

915
The following implements a HTTP server that has a handler ratelimited to 300 requests every 60 seconds.

0 commit comments

Comments
 (0)