trmrpc+makefile: add genprotos and makefile command

This commit is contained in:
carla 2020-01-16 12:23:15 +02:00
parent 47866abfcf
commit bb78dedc1b
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91
3 changed files with 21 additions and 0 deletions

View file

@ -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

8
trmrpc/README.md Normal file
View file

@ -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.

9
trmrpc/gen_protos.sh Executable file
View file

@ -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