diff --git a/Makefile b/Makefile index 34fd77f..7881d3b 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,10 @@ goveralls: $(GOVERALLS_BIN) @$(call print, "Sending coverage report.") $(GOVERALLS_BIN) -coverprofile=coverage.txt -service=travis-ci +rpc: + @$(call print, "Compiling protos.") + cd ./trmrpc; ./gen_protos.sh + travis-race: lint unit-race travis-cover: lint unit-cover goveralls diff --git a/trmrpc/README.md b/trmrpc/README.md new file mode 100644 index 0000000..1957730 --- /dev/null +++ b/trmrpc/README.md @@ -0,0 +1,8 @@ +trmrpc +===== +This package implements terminator's RPC client and server. + +## Generate protobuf definitions +1. Follow the installation steps provided in lnd's [installation instructions](https://github.com/lightningnetwork/lnd/blob/master/lnrpc/README.md#generate-protobuf-definitions). + +2. Run [`gen_protos.sh`](https://github.com/lightninglabs/terminator/tree/master/trmrpc/gen_protos.sh) to generate new protobuf definitions. diff --git a/trmrpc/gen_protos.sh b/trmrpc/gen_protos.sh new file mode 100755 index 0000000..7f49a2f --- /dev/null +++ b/trmrpc/gen_protos.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "Generating terminator gRPC server protos" + +# Generate the protos. +protoc -I/usr/local/include -I. \ + -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ + --go_out=plugins=grpc,paths=source_relative:. \ + rpc.proto