refactor(gRPC): update go proto file
This commit is contained in:
8
Makefile
8
Makefile
@@ -12,6 +12,9 @@ GOFILES := $(shell find . -name "*.go" -type f)
|
||||
TAGS ?= sqlite
|
||||
LDFLAGS ?= -X 'main.Version=$(VERSION)'
|
||||
|
||||
PROTOC_GEN_GO=v1.28
|
||||
PROTOC_GEN_GO_GRPC=v1.2
|
||||
|
||||
ifneq ($(shell uname), Darwin)
|
||||
EXTLDFLAGS = -extldflags "-static" $(null)
|
||||
else
|
||||
@@ -163,6 +166,11 @@ clean:
|
||||
find . -name *.db -delete
|
||||
-rm -rf release dist .cover
|
||||
|
||||
.PHONY: proto_install
|
||||
proto_install:
|
||||
$(GO) install google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GEN_GO)
|
||||
$(GO) install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$(PROTOC_GEN_GO_GRPC)
|
||||
|
||||
generate_proto_js:
|
||||
npm install grpc-tools
|
||||
protoc -I rpc/proto rpc/proto/gorush.proto --js_out=import_style=commonjs,binary:rpc/example/node/ --grpc_out=rpc/example/node/ --plugin=protoc-gen-grpc="node_modules/.bin/grpc_tools_node_protoc_plugin"
|
||||
|
||||
Reference in New Issue
Block a user