redis rpc服务, 提供redis操作方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
297 B

  1. package redisrpc
  2. import (
  3. "net/rpc"
  4. "git.tetele.net/tgo/conf"
  5. )
  6. func Conn(url ...string) (*RedisServiceClient, *rpc.Client, error) {
  7. var rpc_url string = "127.0.0.1:" + conf.REDIS_RPC_PORT
  8. if len(url) > 0 && url[0] != "" {
  9. rpc_url = url[0]
  10. }
  11. return DialRedisService("tcp", rpc_url)
  12. }