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:
parent
eb66262121
commit
95dde4959d
@ -32,6 +32,7 @@ var empty = &ptypes.Empty{}
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
sn snapshots.Snapshotter
|
sn snapshots.Snapshotter
|
||||||
|
snapshotsapi.UnimplementedSnapshotsServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// FromSnapshotter returns a Snapshot API server from a containerd snapshotter
|
// FromSnapshotter returns a Snapshot API server from a containerd snapshotter
|
||||||
|
@ -55,6 +55,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
local api.ContainersClient
|
local api.ContainersClient
|
||||||
|
api.UnimplementedContainersServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ api.ContainersServer = &service{}
|
var _ api.ContainersServer = &service{}
|
||||||
|
@ -38,6 +38,7 @@ import (
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
store content.Store
|
store content.Store
|
||||||
|
api.UnimplementedContentServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var bufPool = sync.Pool{
|
var bufPool = sync.Pool{
|
||||||
|
@ -53,6 +53,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
local diffapi.DiffClient
|
local diffapi.DiffClient
|
||||||
|
diffapi.UnimplementedDiffServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ diffapi.DiffServer = &service{}
|
var _ diffapi.DiffServer = &service{}
|
||||||
|
@ -52,6 +52,7 @@ func init() {
|
|||||||
type service struct {
|
type service struct {
|
||||||
ttService *ttrpcService
|
ttService *ttrpcService
|
||||||
events *exchange.Exchange
|
events *exchange.Exchange
|
||||||
|
api.UnimplementedEventsServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewService returns the GRPC events server
|
// NewService returns the GRPC events server
|
||||||
|
@ -54,6 +54,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
local imagesapi.ImagesClient
|
local imagesapi.ImagesClient
|
||||||
|
imagesapi.UnimplementedImagesServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ imagesapi.ImagesServer = &service{}
|
var _ imagesapi.ImagesServer = &service{}
|
||||||
|
@ -62,6 +62,7 @@ func init() {
|
|||||||
|
|
||||||
type server struct {
|
type server struct {
|
||||||
local api.IntrospectionClient
|
local api.IntrospectionClient
|
||||||
|
api.UnimplementedIntrospectionServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = (api.IntrospectionServer)(&server{})
|
var _ = (api.IntrospectionServer)(&server{})
|
||||||
|
@ -47,6 +47,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
lm leases.Manager
|
lm leases.Manager
|
||||||
|
api.UnimplementedLeasesServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) Register(server *grpc.Server) error {
|
func (s *service) Register(server *grpc.Server) error {
|
||||||
|
@ -54,6 +54,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
local api.NamespacesClient
|
local api.NamespacesClient
|
||||||
|
api.UnimplementedNamespacesServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ api.NamespacesServer = &service{}
|
var _ api.NamespacesServer = &service{}
|
||||||
|
@ -59,6 +59,7 @@ func init() {
|
|||||||
|
|
||||||
type controllerService struct {
|
type controllerService struct {
|
||||||
local api.ControllerClient
|
local api.ControllerClient
|
||||||
|
api.UnimplementedControllerServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ api.ControllerServer = (*controllerService)(nil)
|
var _ api.ControllerServer = (*controllerService)(nil)
|
||||||
|
@ -55,6 +55,7 @@ func init() {
|
|||||||
|
|
||||||
type sandboxService struct {
|
type sandboxService struct {
|
||||||
local api.StoreClient
|
local api.StoreClient
|
||||||
|
api.UnimplementedStoreServer
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ api.StoreServer = (*sandboxService)(nil)
|
var _ api.StoreServer = (*sandboxService)(nil)
|
||||||
|
@ -48,6 +48,7 @@ var empty = &ptypes.Empty{}
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
ss map[string]snapshots.Snapshotter
|
ss map[string]snapshots.Snapshotter
|
||||||
|
snapshotsapi.UnimplementedSnapshotsServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func newService(ic *plugin.InitContext) (interface{}, error) {
|
func newService(ic *plugin.InitContext) (interface{}, error) {
|
||||||
|
@ -58,6 +58,7 @@ func init() {
|
|||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
local api.TasksClient
|
local api.TasksClient
|
||||||
|
api.UnimplementedTasksServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) Register(server *grpc.Server) error {
|
func (s *service) Register(server *grpc.Server) error {
|
||||||
|
@ -41,6 +41,7 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
|
api.UnimplementedVersionServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) Register(server *grpc.Server) error {
|
func (s *service) Register(server *grpc.Server) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user