mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
allow setting a custom go-redis client at Iris go redis sessions driver as request at https://chat.iris-go.com
This commit is contained in:
@@ -30,11 +30,16 @@ func main() {
|
||||
Password: "",
|
||||
Database: "",
|
||||
Prefix: "myapp-",
|
||||
Driver: redis.GoRedis(), // defaults.
|
||||
Driver: redis.GoRedis(), // defaults to this driver.
|
||||
// To set a custom, existing go-redis client, use the "SetClient" method:
|
||||
// Driver: redis.GoRedis().SetClient(customGoRedisClient)
|
||||
})
|
||||
|
||||
// Optionally configure the underline driver:
|
||||
// driver := redis.GoRedis()
|
||||
// // To set a custom client:
|
||||
// driver.SetClient(customGoRedisClient)
|
||||
// OR:
|
||||
// driver.ClientOptions = redis.Options{...}
|
||||
// driver.ClusterOptions = redis.ClusterOptions{...}
|
||||
// redis.New(redis.Config{Driver: driver, ...})
|
||||
|
||||
Reference in New Issue
Block a user