Update ctr so it works again on windows

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-07-16 12:37:04 +02:00
parent 61fbd2311c
commit a4aaa09ccc
19 changed files with 164 additions and 201 deletions

View File

@@ -8,6 +8,13 @@ import (
"github.com/containerd/containerd/sys"
)
const (
// DefaultAddress is the default unix socket address
DefaultAddress = "/run/containerd/containerd.sock"
// DefaultDebuggAddress is the default unix socket address for pprof data
DefaultDebugAddress = "/run/containerd/debug.sock"
)
// apply sets config settings on the server process
func apply(ctx context.Context, config *Config) error {
if config.Subreaper {

View File

@@ -1,9 +1,16 @@
// +build !linux
// +build !linux,!windows
package server
import "context"
const (
// DefaultAddress is the default unix socket address
DefaultAddress = "/run/containerd/containerd.sock"
// DefaultDebuggAddress is the default unix socket address for pprof data
DefaultDebugAddress = "/run/containerd/debug.sock"
)
func apply(_ context.Context, _ *Config) error {
return nil
}

16
server/server_windows.go Normal file
View File

@@ -0,0 +1,16 @@
// +build windows
package server
import "context"
const (
// DefaultAddress is the default winpipe address
DefaultAddress = `\\.\pipe\containerd-containerd`
// DefaultDebugAddress is the default winpipe address for pprof data
DefaultDebugAddress = `\\.\pipe\containerd-debug`
)
func apply(_ context.Context, _ *Config) error {
return nil
}