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

@@ -12,7 +12,7 @@ import (
api "github.com/containerd/containerd/api/services/leases/v1"
"github.com/containerd/containerd/metadata"
"github.com/containerd/containerd/plugin"
"github.com/golang/protobuf/ptypes/empty"
ptypes "github.com/gogo/protobuf/types"
"golang.org/x/net/context"
)
@@ -67,13 +67,13 @@ func (s *service) Create(ctx context.Context, r *api.CreateRequest) (*api.Create
}, nil
}
func (s *service) Delete(ctx context.Context, r *api.DeleteRequest) (*empty.Empty, error) {
func (s *service) Delete(ctx context.Context, r *api.DeleteRequest) (*ptypes.Empty, error) {
if err := s.db.Update(func(tx *bolt.Tx) error {
return metadata.NewLeaseManager(tx).Delete(ctx, r.ID)
}); err != nil {
return nil, err
}
return &empty.Empty{}, nil
return &ptypes.Empty{}, nil
}
func (s *service) List(ctx context.Context, r *api.ListRequest) (*api.ListResponse, error) {