Move plugin registration to separate package
Only compile in plugin support on non-windows 1.8. Re-enable go 1.7.x tests. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
@@ -5,10 +5,10 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/containerd"
|
||||
api "github.com/docker/containerd/api/services/content"
|
||||
"github.com/docker/containerd/content"
|
||||
"github.com/docker/containerd/log"
|
||||
"github.com/docker/containerd/plugin"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
@@ -30,13 +30,13 @@ var bufPool = sync.Pool{
|
||||
var _ api.ContentServer = &Service{}
|
||||
|
||||
func init() {
|
||||
containerd.Register("content-grpc", &containerd.Registration{
|
||||
Type: containerd.GRPCPlugin,
|
||||
plugin.Register("content-grpc", &plugin.Registration{
|
||||
Type: plugin.GRPCPlugin,
|
||||
Init: NewService,
|
||||
})
|
||||
}
|
||||
|
||||
func NewService(ic *containerd.InitContext) (interface{}, error) {
|
||||
func NewService(ic *plugin.InitContext) (interface{}, error) {
|
||||
return &Service{
|
||||
store: ic.Store,
|
||||
}, nil
|
||||
|
||||
Reference in New Issue
Block a user