summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-11-23 15:53:48 -0800
committer=Corey Hulen <corey@hulen.com>2015-11-23 15:53:48 -0800
commit4f4cd5e63573da4d6edcc7d4213afaca67c19f88 (patch)
treecefbc7af53629d97644ca2f6b2369e9d879f0101 /Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go
parentf8a3c9a14edca6df0647d89cf225f2470cbe025c (diff)
downloadchat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.gz
chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.bz2
chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.zip
upgrading libs
Diffstat (limited to 'Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go')
-rw-r--r--Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go
index 9daf2e33f..c29b35f81 100644
--- a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go
+++ b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go
@@ -25,7 +25,7 @@ import (
"sync"
"time"
- "github.com/garyburd/redigo/internal"
+ "github.com/mattermost/platform/Godeps/_workspace/src/github.com/garyburd/redigo/internal"
)
var nowFunc = time.Now // for testing
@@ -94,7 +94,10 @@ var (
type Pool struct {
// Dial is an application supplied function for creating and configuring a
- // connection
+ // connection.
+ //
+ // The connection returned from Dial must not be in a special state
+ // (subscribed to pubsub channel, transaction started, ...).
Dial func() (Conn, error)
// TestOnBorrow is an optional application supplied function for checking
@@ -116,7 +119,7 @@ type Pool struct {
// the timeout to a value less than the server's timeout.
IdleTimeout time.Duration
- // If Wait is true and the pool is at the MaxIdle limit, then Get() waits
+ // If Wait is true and the pool is at the MaxActive limit, then Get() waits
// for a connection to be returned to the pool before returning.
Wait bool
@@ -135,8 +138,9 @@ type idleConn struct {
t time.Time
}
-// NewPool creates a new pool. This function is deprecated. Applications should
-// initialize the Pool fields directly as shown in example.
+// NewPool creates a new pool.
+//
+// Deprecated: Initialize the Pool directory as shown in the example.
func NewPool(newFn func() (Conn, error), maxIdle int) *Pool {
return &Pool{Dial: newFn, MaxIdle: maxIdle}
}