Move Container and runtime to plugin pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user