1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libcontainerd/remote_daemon_windows.go
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00

50 lines
1.1 KiB
Go

// +build remote_daemon
package libcontainerd // import "github.com/docker/docker/libcontainerd"
import (
"os"
)
const (
grpcPipeName = `\\.\pipe\docker-containerd-containerd`
debugPipeName = `\\.\pipe\docker-containerd-debug`
)
func (r *remote) setDefaults() {
if r.GRPC.Address == "" {
r.GRPC.Address = grpcPipeName
}
if r.Debug.Address == "" {
r.Debug.Address = debugPipeName
}
if r.Debug.Level == "" {
r.Debug.Level = "info"
}
if r.snapshotter == "" {
r.snapshotter = "naive" // TODO(mlaventure): switch to "windows" once implemented
}
}
func (r *remote) stopDaemon() {
p, err := os.FindProcess(r.daemonPid)
if err != nil {
r.logger.WithField("pid", r.daemonPid).Warn("could not find daemon process")
return
}
if err = p.Kill(); err != nil {
r.logger.WithError(err).WithField("pid", r.daemonPid).Warn("could not kill daemon process")
return
}
_, err = p.Wait()
if err != nil {
r.logger.WithError(err).WithField("pid", r.daemonPid).Warn("wait for daemon process")
return
}
}
func (r *remote) platformCleanup() {
// Nothing to do
}