Skip to content

Commit

Permalink
Merge pull request #1564 from SadikSunbul/main
Browse files Browse the repository at this point in the history
docs: Document DragonflyDB support
  • Loading branch information
ReneWerner87 authored Feb 3, 2025
2 parents d4b2546 + c00f649 commit 4f0e6c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (s *Storage) Keys() ([][]byte, error)
```
### Installation
Redis is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:

> **Note:** You can also use [DragonflyDB](https://dragonflydb.io/) as a Redis replacement.
> Since DragonflyDB is fully compatible with the Redis API, you can use it exactly like Redis **without any code changes**.
> [Example](#example-using-dragonflydb)


```bash
go mod init github.com/<user>/<repo>
```
Expand Down Expand Up @@ -194,3 +200,7 @@ var ConfigDefault = Config{
SentinelPassword: "",
}
```

### Example: Using DragonflyDB
> **Note:** You can use [DragonflyDB](https://dragonflydb.io/) in the same way as Redis.
> Simply start a DragonflyDB server and configure it just like Redis. Then, call `New()` and use it exactly as you would with Redis.
2 changes: 1 addition & 1 deletion redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Storage struct {
db redis.UniversalClient
}

// New creates a new redis storage
// New creates a new Redis storage instance.
func New(config ...Config) *Storage {
// Set default config
cfg := configDefault(config...)
Expand Down

0 comments on commit 4f0e6c4

Please sign in to comment.