(client ecpb.EchoClient, message string)
| 110 | } |
| 111 | |
| 112 | func callUnaryEcho(client ecpb.EchoClient, message string) { |
| 113 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| 114 | defer cancel() |
| 115 | resp, err := client.UnaryEcho(ctx, &ecpb.EchoRequest{Message: message}) |
| 116 | if err != nil { |
| 117 | log.Fatalf("client.UnaryEcho(_) = _, %v: ", err) |
| 118 | } |
| 119 | fmt.Println("UnaryEcho: ", resp.Message) |
| 120 | } |
| 121 | |
| 122 | func callBidiStreamingEcho(client ecpb.EchoClient) { |
| 123 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |