# README
Example Service: test
This example service is used for testing purposes.
Prerequisites
- Install gRPC
- Make sure protoc is in GOPATH/bin
- Make sure google/protobuf is also in GOPATH/bin
- Install grpc-gateway
- Install from vendor directory to avoid issues
Generate Stubs
The stubs for this example have already been generated and checked in, so these commands are only provided as a reference.
- Generate gRPC client/server stubs:
protoc -I ./ -I ../../../../../github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:./ proto/test.proto
- Generate HTTP gateway:
protoc -I ./ -I ../../../../../github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:. proto/test.proto
- Generate Swagger definitions:
protoc -I ./ -I ../../../../../github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --proto_path=./proto --swagger_out=logtostderr=true:. proto/test.proto
# Packages
Package test is a reverse proxy.
# Functions
NewGRPCService creates a new instance of GRPCService.
NewService creates a new instance of Service.
# Structs
GRPCService contains the implementation for the gRPC service.
Service contains the implementation for the gRPC service.