Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating protos to gogoprotobuf with fewer allocs and reflection. #2639

Merged
merged 2 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions protos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright 2018 Dgraph Labs, Inc.
#
# This file is available under the Apache License, Version 2.0,
# with the Commons Clause restriction.
#

PROTO_PATH := ${GOPATH}/src:.
PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/gogo/protobuf
PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/dgraph-io/dgo/protos

.PHONY: help
help:
@echo Use \"make regenerate\" to proceed.

clean:
@mkdir -p pb && rm -f pb/pb.pb.go

regenerate: clean
@protoc \
--proto_path=${PROTO_PATH} \
--gogofaster_out=plugins=grpc,Mapi.proto=github.com/dgraph-io/dgo/protos/api:pb \
pb.proto
@echo Done.
6 changes: 6 additions & 0 deletions protos/pb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ syntax = "proto3";

package pb;

import "gogoproto/gogo.proto";
import "api.proto";

option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = true;

message List {
repeated fixed64 uids = 1;
}
Expand Down
496 changes: 249 additions & 247 deletions protos/pb/pb.pb.go

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions vendor/github.com/gogo/protobuf/gogoproto/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

169 changes: 169 additions & 0 deletions vendor/github.com/gogo/protobuf/gogoproto/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading