Move service to execution package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
package executors
|
||||
|
||||
import "github.com/docker/containerd/execution"
|
||||
|
||||
var executors = make(map[string]func() execution.Executor)
|
||||
|
||||
func Register(name string, e func() execution.Executor) {
|
||||
executors[name] = e
|
||||
}
|
||||
|
||||
func Get(name string) func() execution.Executor {
|
||||
return executors[name]
|
||||
}
|
||||
@@ -10,16 +10,10 @@ import (
|
||||
|
||||
"github.com/crosbymichael/go-runc"
|
||||
"github.com/docker/containerd/execution"
|
||||
"github.com/docker/containerd/executors"
|
||||
)
|
||||
|
||||
var ErrRootEmpty = errors.New("oci: runtime root cannot be an empty string")
|
||||
|
||||
func init() {
|
||||
executors.Register("oci", New)
|
||||
executors.Register("runc", New)
|
||||
}
|
||||
|
||||
func New(root string) *OCIRuntime {
|
||||
return &OCIRuntime{
|
||||
root: root,
|
||||
|
||||
Reference in New Issue
Block a user