Skip to content

Commit 0e35464

Browse files
committed
Add gRPC plugin proto changes
Relating to issue jaegertracing#422 and review jaegertracing#1214, add proto changes to later allow for gRPC plugins to be used. Signed-off-by: Charles Dixon <[email protected]>
1 parent cc913d2 commit 0e35464

File tree

8 files changed

+5898
-86
lines changed

8 files changed

+5898
-86
lines changed

Diff for: Gopkg.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Gopkg.toml

+12
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ required = [
118118
[prune]
119119
go-tests = true
120120
unused-packages = true
121+
[[prune.project]]
122+
name = "github.com/gogo/protobuf"
123+
non-go = false
124+
unused-packages = false
125+
[[prune.project]]
126+
name = "github.com/grpc-ecosystem/grpc-gateway"
127+
non-go = false
128+
unused-packages = false
129+
[[prune.project]]
130+
name = "github.com/gogo/googleapis"
131+
non-go = false
132+
unused-packages = false
121133

122134
[[constraint]]
123135
name = "github.com/Shopify/sarama"

Diff for: Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,11 @@ PROTO_INCLUDES := \
330330
-I model/proto \
331331
-I vendor/github.com/grpc-ecosystem/grpc-gateway \
332332
-I vendor/github.com/gogo/googleapis \
333+
-I vendor/github.com/gogo/protobuf/protobuf \
333334
-I vendor/github.com/gogo/protobuf
334335
# Remapping of std types to gogo types (must not contain spaces)
335336
PROTO_GOGO_MAPPINGS := $(shell echo \
337+
Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/types, \
336338
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types, \
337339
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types, \
338340
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types, \
@@ -342,7 +344,7 @@ PROTO_GOGO_MAPPINGS := $(shell echo \
342344

343345
.PHONY: proto
344346
proto:
345-
# Generate gogo, gRPC-Gateway, swagger, go-validators output.
347+
# Generate gogo, gRPC-Gateway, swagger, go-validators, gRPC-storage-plugin output.
346348
#
347349
# -I declares import folders, in order of importance
348350
# This is how proto resolves the protofile imports.
@@ -378,11 +380,18 @@ proto:
378380
--swagger_out=$(PWD)/proto-gen/openapi/ \
379381
model/proto/api_v2.proto
380382

383+
protoc \
384+
$(PROTO_INCLUDES) \
385+
-I plugin/storage/grpc/proto \
386+
--gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/plugin/storage/grpc/proto \
387+
plugin/storage/grpc/proto/storage.proto
388+
381389
protoc \
382390
-I model/proto \
383391
--go_out=$(PWD)/model/prototest/ \
384392
model/proto/model_test.proto
385393

394+
386395
.PHONY: proto-install
387396
proto-install:
388397
go get -u github.com/golang/glog

Diff for: model/dependencies.go

-22
This file was deleted.

0 commit comments

Comments
 (0)