1
0
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:
Gerasimos (Makis) Maropoulos
2022-08-15 00:58:49 +03:00
parent 16af6d017f
commit 057fa462f4
4 changed files with 37 additions and 16 deletions

View File

@@ -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, ...})