protobuf: use the gogo/types package for empty

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-11-15 19:08:54 -08:00
parent f49b1b7179
commit c5022ad92d
27 changed files with 87 additions and 87 deletions

View File

@@ -23,7 +23,7 @@ import (
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/reaper"
"github.com/containerd/typeurl"
google_protobuf "github.com/golang/protobuf/ptypes/empty"
ptypes "github.com/gogo/protobuf/types"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
"google.golang.org/grpc"
@@ -163,7 +163,7 @@ func handleSignals(logger *logrus.Entry, signals chan os.Signal, server *grpc.Se
Signal: uint32(syscall.SIGKILL),
All: true,
})
sv.Delete(context.Background(), &google_protobuf.Empty{})
sv.Delete(context.Background(), &ptypes.Empty{})
close(done)
})
case unix.SIGUSR1:

View File

@@ -16,15 +16,14 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands"
shim "github.com/containerd/containerd/linux/shim/v1"
"github.com/containerd/typeurl"
protobuf "github.com/gogo/protobuf/types"
google_protobuf "github.com/golang/protobuf/ptypes/empty"
ptypes "github.com/gogo/protobuf/types"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
var empty = &google_protobuf.Empty{}
var empty = &ptypes.Empty{}
var fifoFlags = []cli.Flag{
cli.StringFlag{
@@ -168,7 +167,7 @@ var execCommand = cli.Command{
rq := &shim.ExecProcessRequest{
ID: id,
Spec: &protobuf.Any{
Spec: &ptypes.Any{
TypeUrl: url,
Value: spec,
},