api: use weak imports for plugin protobufs

Because of a side-effect import, we have the possibility of pulling in
several unnecessary packages that are used by the plugin and not at
runtime to implement protobuf structures. Setting these imports to
`weak` prevents this from happening, reducing the total import set,
reducing memory usage and binary size.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-11-16 20:18:15 -08:00
parent 5c6e789dde
commit 50532f231a
54 changed files with 851 additions and 792 deletions

View File

@@ -2,7 +2,7 @@ syntax = "proto3";
package containerd.windows.hcsshim;
import "gogoproto/gogo.proto";
import weak "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";