package redisrpc
|
|
|
|
import (
|
|
"net/rpc"
|
|
|
|
"git.tetele.net/tgo/conf"
|
|
)
|
|
|
|
func Conn(url ...string) (*RedisServiceClient, *rpc.Client, error) {
|
|
|
|
var rpc_url string = "127.0.0.1:" + conf.REDIS_RPC_PORT
|
|
if len(url) > 0 && url[0] != "" {
|
|
rpc_url = url[0]
|
|
}
|
|
|
|
return DialRedisService("tcp", rpc_url)
|
|
}
|