func dial(ctx context.Context, addr string, timeout time.Duration) (vtgateconn.Impl, error) { cc, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(timeout)) if err != nil { return nil, err } c := pbs.NewVitessClient(cc) return &vtgateConn{ cc: cc, c: c, }, nil }
func dial(ctx context.Context, addr string, timeout time.Duration) (vtgateconn.Impl, error) { opt, err := grpcutils.ClientSecureDialOption(*cert, *key, *ca, *name) if err != nil { return nil, err } cc, err := grpc.Dial(addr, opt, grpc.WithBlock(), grpc.WithTimeout(timeout)) if err != nil { return nil, err } c := vtgateservicepb.NewVitessClient(cc) return &vtgateConn{ cc: cc, c: c, }, nil }