Skip to content

Commit

Permalink
proto: Split reusable structures into their own package
Browse files Browse the repository at this point in the history
Some structures such as Interface and Route are not only used by the
kata-agent since they are generic enough to be reused by kata-runtime
or kata-netmon.

By splitting those structures into their separate package, we prevent
their consumers from importing the whole protocols/grpc package which
pulls a lot of unneeded content.

Fixes kata-containers#399

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
  • Loading branch information
Sebastien Boeuf committed Oct 24, 2018
1 parent 03f040f commit d63dc2b
Show file tree
Hide file tree
Showing 7 changed files with 1,630 additions and 1,235 deletions.
11 changes: 9 additions & 2 deletions hack/update-generated-agent-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
#
# SPDX-License-Identifier: Apache-2.0
#
protoc -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf \

protoc \
pkg/types/types.proto --gogofast_out=.

protoc \
-I=$GOPATH/src \
-I=$GOPATH/src/github.com/gogo/protobuf/protobuf \
-I=pkg/types \
--proto_path=protocols/grpc --gogofast_out=\
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\
Expand All @@ -12,4 +19,4 @@ Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
plugins=grpc:protocols/grpc \
protocols/grpc/*.proto
protocols/grpc/*.proto \
Loading

0 comments on commit d63dc2b

Please sign in to comment.