-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadapter.go
More file actions
20 lines (18 loc) · 807 Bytes
/
Copy pathadapter.go
File metadata and controls
20 lines (18 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package adapters
import "context"
// Adapter provides a generic interface that's compatible with various Go redis libraries.
//
// This package ships with native support for [go-redis] and [redigo], see [github.com/aidenwallis/go-ratelimiting/redis/adapters/go-redis]
// and [github.com/aidenwallis/redis/adapters/redigo].
//
// Alternatively, if you ship your own Redis implementation, you can build your own wrapper compatible with this interface to consume this
// package.
//
// [go-redis]: https://github.com/redis/go-redis
// [redigo]: https://github.com/gomodule/redigo
type Adapter interface {
// Eval adds support for the redis EVAL command
//
// See https://redis.io/commands/eval
Eval(ctx context.Context, script string, keys []string, args []interface{}) (output interface{}, err error)
}