Use defaults pkg for all platforms

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-11-28 18:04:21 -08:00
parent 90a6b79bfc
commit 6bf779c589
8 changed files with 45 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
// Package defaults provides several common defaults for interacting wtih
// containerd. These can be used on the client-side or server-side.
// +build !windows
package defaults
const (

View File

@@ -0,0 +1,24 @@
// +build windows
package defaults
import (
"os"
"path/filepath"
)
var (
// DefaultRootDir is the default location used by containerd to store
// persistent data
DefaultRootDir = filepath.Join(os.Getenv("programfiles"), "containerd", "root")
// DefaultStateDir is the default location used by containerd to store
// transient data
DefaultStateDir = filepath.Join(os.Getenv("programfiles"), "containerd", "state")
)
const (
// DefaultAddress is the default winpipe address
DefaultAddress = `\\.\pipe\containerd-containerd`
// DefaultDebugAddress is the default winpipe address for pprof data
DefaultDebugAddress = `\\.\pipe\containerd-debug`
)

3
defaults/doc.go Normal file
View File

@@ -0,0 +1,3 @@
// Package defaults provides several common defaults for interacting wtih
// containerd. These can be used on the client-side or server-side.
package defaults