1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//go:build !linux
package hostcontract
import (
"context"
"io"
)
type Options struct {
Role Role
StateDir string
Self []string
PastaPath string
AssetCache string
Getenv func(string) string
}
const (
ProbeHoldFlag = "-probe-hold"
ProbeUsernsFlag = "-probe-userns"
)
func Gather(ctx context.Context, o Options) Facts {
return Facts{Role: o.Role, VersionErr: "the Linux host contract has no meaning on this OS"}
}
func GatherRequesterGateway(o Options) Facts {
return Facts{Role: RoleGateway, VersionErr: "the Linux host contract has no meaning on this OS"}
}
func UsernsChild(stdin io.Reader, stdout io.Writer) int { return 2 }