--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/yCUwuHycNWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/44f304ae-3d12-49ce-9931-0b8608be6a27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
rpc error: code = Unavailable desc = all SubConns are in TransientFailure
lis, err := net.Listen("tcp", port)
if err != nil {
return fmt.Errorf("Failed to listen: %s", err)
}
creds, err := credentials.NewServerTLSFromFile(certFile, keyFile)
if err != nil {
return fmt.Errorf("could not load keys: %s", err)
}
opts := []grpc.ServerOption{grpc.Creds(creds)}
grpcServer := grpc.NewServer(opts...)
pb.RegisterHelloServer(grpcServer, newServer())
if err := grpcServer.Serve(lis); err != nil {
return fmt.Errorf("Failed to start Hello Server: %s", err)
}
creds, err := credentials.NewClientTLSFromFile(certFile, "")
if err != nil {
log.Fatalf("could not load cert: %s", err)
}
conn, err = grpc.Dial(port, grpc.WithTransportCredentials(creds))
if err != nil {
log.Fatalf("Failed to connect to server: %s", err)
return
}
defer conn.Close()
c := pb.NewHelloClient(conn)
r, err := c.HelloServer(context.Background(), &pb.Request{Name: "Myname", Id:10})
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/92a3a883-14af-4c00-a0c5-90ad04d1ee29%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.