1. python的超时

  1. response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), timeout=30)

2. go的超时

  1. ctx, cancel := context.WithTimeout(context.TODO(), time.Second * 3)
  2. defer cancel()
  3. r,err := c.SayHello(ctx, &pb.HelloRequest{Name: name})