mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
add TLSConfig on redis configuration #1515
Former-commit-id: 3ce4a43185c7b6b5250f49483d7d229ea9dd1670
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
@@ -45,6 +46,11 @@ type Config struct {
|
||||
// Delim the delimeter for the keys on the sessiondb. Defaults to "-".
|
||||
Delim string
|
||||
|
||||
// TLSConfig will cause Dial to perform a TLS handshake using the provided
|
||||
// config. If is nil then no TLS is used.
|
||||
// See https://golang.org/pkg/crypto/tls/#Config
|
||||
TLSConfig *tls.Config
|
||||
|
||||
// Driver supports `Redigo()` or `Radix()` go clients for redis.
|
||||
// Configure each driver by the return value of their constructors.
|
||||
//
|
||||
@@ -63,6 +69,7 @@ func DefaultConfig() Config {
|
||||
Timeout: DefaultRedisTimeout,
|
||||
Prefix: "",
|
||||
Delim: DefaultDelim,
|
||||
TLSConfig: nil,
|
||||
Driver: Redigo(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user