func (client *client) Dial(endPoint *topodatapb.EndPoint, connTimeout time.Duration) error { addr := netutil.JoinHostPort(endPoint.Host, endPoint.PortMap["grpc"]) var err error client.cc, err = grpc.Dial(addr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(connTimeout)) if err != nil { return err } client.c = binlogservicepb.NewUpdateStreamClient(client.cc) return nil }
func (client *client) Dial(endPoint topo.EndPoint, connTimeout time.Duration) error { addr := netutil.JoinHostPort(endPoint.Host, endPoint.NamedPortMap["grpc"]) var err error client.cc, err = grpc.Dial(addr, grpc.WithBlock(), grpc.WithTimeout(connTimeout)) if err != nil { return err } client.c = pbs.NewUpdateStreamClient(client.cc) client.ctx = context.Background() return nil }