mirror of
https://github.com/kataras/iris.git
synced 2025-12-24 05:17:03 +00:00
add cluster driver
Former-commit-id: 1ca87c78690a3c7a5bb40d8d669de4371bd3932c
This commit is contained in:
@@ -31,7 +31,7 @@ type Config struct {
|
||||
Addr string
|
||||
// Clusters a list of network addresses for clusters.
|
||||
// If not empty "Addr" is ignored.
|
||||
// Currently only Radix() Driver supports it.
|
||||
// Currently only RadixCluster() Driver supports it.
|
||||
Clusters []string
|
||||
// Password string .If no password then no 'AUTH'. Defaults to "".
|
||||
Password string
|
||||
@@ -51,7 +51,7 @@ type Config struct {
|
||||
// See https://golang.org/pkg/crypto/tls/#Config
|
||||
TLSConfig *tls.Config
|
||||
|
||||
// Driver supports `Redigo()` or `Radix()` go clients for redis.
|
||||
// Driver supports `Redigo()` or `Radix()` or `RadixCluster()` go clients for redis.
|
||||
// Configure each driver by the return value of their constructors.
|
||||
//
|
||||
// Defaults to `Redigo()`.
|
||||
@@ -119,8 +119,7 @@ func New(cfg ...Config) *Database {
|
||||
db := &Database{c: c}
|
||||
_, err := db.c.Driver.PingPong()
|
||||
if err != nil {
|
||||
golog.Debugf("error connecting to redis: %v", err)
|
||||
return nil
|
||||
panic(err)
|
||||
}
|
||||
// runtime.SetFinalizer(db, closeDB)
|
||||
return db
|
||||
|
||||
Reference in New Issue
Block a user