2013-11-07 18:20:15 +04:00
|
|
|
package redis
|
|
|
|
|
2016-03-04 11:03:50 +03:00
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
"time"
|
|
|
|
)
|
2015-05-10 15:33:04 +03:00
|
|
|
|
2013-11-07 18:20:15 +04:00
|
|
|
func (c *baseClient) Pool() pool {
|
|
|
|
return c.connPool
|
|
|
|
}
|
2015-03-23 11:23:33 +03:00
|
|
|
|
2016-03-01 13:31:06 +03:00
|
|
|
func (c *PubSub) Pool() pool {
|
|
|
|
return c.base.connPool
|
|
|
|
}
|
|
|
|
|
2015-10-13 12:02:29 +03:00
|
|
|
var NewConnDialer = newConnDialer
|
|
|
|
|
2015-05-10 15:33:04 +03:00
|
|
|
func (cn *conn) SetNetConn(netcn net.Conn) {
|
|
|
|
cn.netcn = netcn
|
|
|
|
}
|
2016-03-04 11:03:50 +03:00
|
|
|
|
|
|
|
func SetTime(tm time.Time) {
|
|
|
|
now = func() time.Time {
|
|
|
|
return tm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func RestoreTime() {
|
|
|
|
now = time.Now
|
|
|
|
}
|