Move shim service into top lvl package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-01-24 15:55:32 -08:00
parent fe280d2df0
commit d619954a2b
7 changed files with 33 additions and 69 deletions

View file

@ -10,7 +10,8 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/containerd"
"github.com/docker/containerd/api/shim"
apishim "github.com/docker/containerd/api/shim"
"github.com/docker/containerd/shim"
"github.com/docker/containerd/sys"
"github.com/docker/containerd/utils"
"github.com/urfave/cli"
@ -52,11 +53,9 @@ func main() {
}
var (
server = grpc.NewServer()
sv = &service{
processes: make(map[int]process),
}
sv = shim.NewService()
)
shim.RegisterShimServer(server, sv)
apishim.RegisterShimServer(server, sv)
l, err := utils.CreateUnixSocket("shim.sock")
if err != nil {
return err
@ -77,7 +76,7 @@ func main() {
logrus.WithError(err).Error("reap exit status")
}
for _, e := range exits {
if err := sv.processExited(e); err != nil {
if err := sv.ProcessExit(e); err != nil {
return err
}
}