mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Extract pool package. Add pool benchmark.
This commit is contained in:
@ -1,30 +1,11 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
import "gopkg.in/redis.v3/internal/pool"
|
||||
|
||||
func (c *baseClient) Pool() pool {
|
||||
func (c *baseClient) Pool() pool.Pooler {
|
||||
return c.connPool
|
||||
}
|
||||
|
||||
func (c *PubSub) Pool() pool {
|
||||
func (c *PubSub) Pool() pool.Pooler {
|
||||
return c.base.connPool
|
||||
}
|
||||
|
||||
var NewConnDialer = newConnDialer
|
||||
|
||||
func (cn *conn) SetNetConn(netcn net.Conn) {
|
||||
cn.netcn = netcn
|
||||
}
|
||||
|
||||
func SetTime(tm time.Time) {
|
||||
now = func() time.Time {
|
||||
return tm
|
||||
}
|
||||
}
|
||||
|
||||
func RestoreTime() {
|
||||
now = time.Now
|
||||
}
|
||||
|
Reference in New Issue
Block a user