Move service to execution package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
c857213b4c
commit
bde30191f4
4 changed files with 8 additions and 30 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue