Embed "Unimplemented" structs as proto recommended

Embedding these structs will be mandatory after migratring off from
gogo/protobuf (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato 2022-04-20 05:42:01 +00:00
parent eb66262121
commit 95dde4959d
14 changed files with 14 additions and 0 deletions

View File

@ -32,6 +32,7 @@ var empty = &ptypes.Empty{}
type service struct {
sn snapshots.Snapshotter
snapshotsapi.UnimplementedSnapshotsServer
}
// FromSnapshotter returns a Snapshot API server from a containerd snapshotter

View File

@ -55,6 +55,7 @@ func init() {
type service struct {
local api.ContainersClient
api.UnimplementedContainersServer
}
var _ api.ContainersServer = &service{}

View File

@ -38,6 +38,7 @@ import (
type service struct {
store content.Store
api.UnimplementedContentServer
}
var bufPool = sync.Pool{

View File

@ -53,6 +53,7 @@ func init() {
type service struct {
local diffapi.DiffClient
diffapi.UnimplementedDiffServer
}
var _ diffapi.DiffServer = &service{}

View File

@ -52,6 +52,7 @@ func init() {
type service struct {
ttService *ttrpcService
events *exchange.Exchange
api.UnimplementedEventsServer
}
// NewService returns the GRPC events server

View File

@ -54,6 +54,7 @@ func init() {
type service struct {
local imagesapi.ImagesClient
imagesapi.UnimplementedImagesServer
}
var _ imagesapi.ImagesServer = &service{}

View File

@ -62,6 +62,7 @@ func init() {
type server struct {
local api.IntrospectionClient
api.UnimplementedIntrospectionServer
}
var _ = (api.IntrospectionServer)(&server{})

View File

@ -47,6 +47,7 @@ func init() {
type service struct {
lm leases.Manager
api.UnimplementedLeasesServer
}
func (s *service) Register(server *grpc.Server) error {

View File

@ -54,6 +54,7 @@ func init() {
type service struct {
local api.NamespacesClient
api.UnimplementedNamespacesServer
}
var _ api.NamespacesServer = &service{}

View File

@ -59,6 +59,7 @@ func init() {
type controllerService struct {
local api.ControllerClient
api.UnimplementedControllerServer
}
var _ api.ControllerServer = (*controllerService)(nil)

View File

@ -55,6 +55,7 @@ func init() {
type sandboxService struct {
local api.StoreClient
api.UnimplementedStoreServer
}
var _ api.StoreServer = (*sandboxService)(nil)

View File

@ -48,6 +48,7 @@ var empty = &ptypes.Empty{}
type service struct {
ss map[string]snapshots.Snapshotter
snapshotsapi.UnimplementedSnapshotsServer
}
func newService(ic *plugin.InitContext) (interface{}, error) {

View File

@ -58,6 +58,7 @@ func init() {
type service struct {
local api.TasksClient
api.UnimplementedTasksServer
}
func (s *service) Register(server *grpc.Server) error {

View File

@ -41,6 +41,7 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
}
type service struct {
api.UnimplementedVersionServer
}
func (s *service) Register(server *grpc.Server) error {