func rpcConnectLeader(urls []string) (net.Conn, error) { leader, err := getLeader(urls) if err != nil { return nil, errors.Trace(err) } conn, err := rpcutil.ConnectUrls(leader.GetAddr(), connectPDTimeout) if err != nil { return nil, errors.Trace(err) } return conn, nil }
func rpcConnect(urls []string) (net.Conn, error) { s := strings.Join(urls, ",") return rpcutil.ConnectUrls(s, connectPDTimeout) }