From 09e5db5a46a4fb9c1f40f878472f4c04f8302321 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 17 Jun 2016 15:01:33 -0700 Subject: [PATCH] Documentation: add grpc-gateway doc --- Documentation/dev-guide/api_grpc_gateway.md | 38 +++++++++++++++++++++ Documentation/docs.md | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 Documentation/dev-guide/api_grpc_gateway.md diff --git a/Documentation/dev-guide/api_grpc_gateway.md b/Documentation/dev-guide/api_grpc_gateway.md new file mode 100644 index 000000000..4028a6f71 --- /dev/null +++ b/Documentation/dev-guide/api_grpc_gateway.md @@ -0,0 +1,38 @@ + +## Why grpc-gateway + +etcd v3 uses [gRPC][grpc] for its messaging protocol. The etcd project includes a gRPC-based [Go client][go-client] and a command line utility, [etcdctl][etcdctl], for communicating with an etcd cluster through gRPC. For languages with no gRPC support, etcd provides a JSON [grpc-gateway][grpc-gateway]. This gateway serves a RESTful proxy that translates HTTP/JSON requests into gRPC messages. + + +## Using grpc-gateway + +The gateway accepts a [JSON mapping][json-mapping] for etcd's [protocol buffer][api-ref] message definitions. Note that `key` and `value` fields are defined as byte arrays and therefore must be base64 encoded in JSON. + +```bash +<