mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00

- tests: implement NetNSDetached method
full diff: 6e200afad5...6bd81372ad
Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
42 lines
728 B
Go
42 lines
728 B
Go
package appdefaults
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
const (
|
|
Address = "npipe:////./pipe/buildkitd"
|
|
)
|
|
|
|
var (
|
|
Root = filepath.Join(os.Getenv("ProgramData"), "buildkitd", ".buildstate")
|
|
ConfigDir = filepath.Join(os.Getenv("ProgramData"), "buildkitd")
|
|
DefaultCNIBinDir = filepath.Join(ConfigDir, "bin")
|
|
DefaultCNIConfigPath = filepath.Join(ConfigDir, "cni.json")
|
|
)
|
|
|
|
var (
|
|
UserCNIConfigPath = DefaultCNIConfigPath
|
|
)
|
|
|
|
func UserAddress() string {
|
|
return Address
|
|
}
|
|
|
|
func EnsureUserAddressDir() error {
|
|
return nil
|
|
}
|
|
|
|
func UserRoot() string {
|
|
return Root
|
|
}
|
|
|
|
func UserConfigDir() string {
|
|
return ConfigDir
|
|
}
|
|
|
|
func TraceSocketPath(inUserNS bool) string {
|
|
return `\\.\pipe\buildkit-otel-grpc`
|
|
}
|