Move Container and runtime to plugin pkg

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-05-11 15:24:12 -07:00
parent fa4e114979
commit 01b9f5ec67
10 changed files with 63 additions and 61 deletions

View File

@@ -263,8 +263,8 @@ func resolveMetaDB(ctx *cli.Context) (*bolt.DB, error) {
return db, nil
}
func loadRuntimes(monitor plugin.ContainerMonitor) (map[string]containerd.Runtime, error) {
o := make(map[string]containerd.Runtime)
func loadRuntimes(monitor plugin.ContainerMonitor) (map[string]plugin.Runtime, error) {
o := make(map[string]plugin.Runtime)
for name, rr := range plugin.Registrations() {
if rr.Type != plugin.RuntimePlugin {
continue
@@ -286,7 +286,7 @@ func loadRuntimes(monitor plugin.ContainerMonitor) (map[string]containerd.Runtim
if err != nil {
return nil, err
}
o[name] = vr.(containerd.Runtime)
o[name] = vr.(plugin.Runtime)
}
return o, nil
}
@@ -356,7 +356,7 @@ func newGRPCServer() *grpc.Server {
return s
}
func loadServices(runtimes map[string]containerd.Runtime, store content.Store, sn snapshot.Snapshotter, meta *bolt.DB) ([]plugin.Service, error) {
func loadServices(runtimes map[string]plugin.Runtime, store content.Store, sn snapshot.Snapshotter, meta *bolt.DB) ([]plugin.Service, error) {
var o []plugin.Service
for name, sr := range plugin.Registrations() {
if sr.Type != plugin.GRPCPlugin {