Skip to content

Commit

Permalink
Changes to deserializeBinary API;
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Apr 29, 2019
1 parent ffe8e9c commit 9941368
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions javascript/net/grpc/web/gatewayclientbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ GatewayClientBase.parseRpcStatus_ = function(data) {
var metadata = {};
var details = rpcStatus.getDetailsList();
for (var i = 0; i < details.length; i++) {
var pair = Pair.deserializeBinary(
details[i].getValue());
var pair = details[i].unpackJspbCompat(
Pair, Pair.deserializeBinary, 'grpc.gateway.Pair');
var first = googCrypt.utf8ByteArrayToString(
pair.getFirst_asU8());
var second = googCrypt.utf8ByteArrayToString(
Expand Down
2 changes: 1 addition & 1 deletion net/grpc/gateway/docker/envoy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM envoyproxy/envoy-dev:latest
FROM envoyproxy/envoy:latest

COPY net/grpc/gateway/examples/echo/envoy.yaml /etc/envoy/envoy.yaml

Expand Down
9 changes: 3 additions & 6 deletions net/grpc/gateway/examples/echo/echo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ syntax = "proto3";

package grpc.gateway.testing;

message Empty {
}
message Empty {}

message EchoRequest {
string message = 1;
Expand Down Expand Up @@ -67,8 +66,7 @@ service EchoService {
rpc Echo(EchoRequest) returns (EchoResponse);

// Sends back abort status.
rpc EchoAbort(EchoRequest) returns (EchoResponse) {
};
rpc EchoAbort(EchoRequest) returns (EchoResponse) {}

// One empty request, ZERO processing, followed by one empty response
// (minimum effort to do message serialization).
Expand All @@ -82,8 +80,7 @@ service EchoService {
// One request followed by a sequence of responses (streamed download).
// The server abort directly.
rpc ServerStreamingEchoAbort(ServerStreamingEchoRequest)
returns (stream ServerStreamingEchoResponse) {
}
returns (stream ServerStreamingEchoResponse) {}

// A sequence of requests followed by one response (streamed upload).
// The server returns the total number of messages as the result.
Expand Down
6 changes: 3 additions & 3 deletions net/grpc/gateway/examples/helloworld/helloworld.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ package helloworld;

service Greeter {
// unary call
rpc SayHello (HelloRequest) returns (HelloReply);
rpc SayHello(HelloRequest) returns (HelloReply);
// server streaming call
rpc SayRepeatHello (RepeatHelloRequest) returns (stream HelloReply);
rpc SayRepeatHello(RepeatHelloRequest) returns (stream HelloReply);
// unary call - response after a length delay
rpc SayHelloAfterDelay (HelloRequest) returns (HelloReply);
rpc SayHelloAfterDelay(HelloRequest) returns (HelloReply);
}

message HelloRequest {
Expand Down

0 comments on commit 9941368

Please sign in to comment.