Documentation ¶
Index ¶
- Variables
- func CheckMdsAvailability() error
- func Enter(cdir string, podPID int, appName types.ACName, stage1Path string, ...) error
- func GC(pdir string, uuid *types.UUID) error
- func InitDebug()
- func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)
- func MergeMounts(mounts []schema.Mount, appMounts []schema.Mount) []schema.Mount
- func MountGC(path, uuid string) error
- func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error
- func Run(cfg RunConfig, dir string, dataDir string)
- type CommonConfig
- type PrepareConfig
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
var ValidOSArch = map[string][]string{
"linux": {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b"},
}
Functions ¶
func CheckMdsAvailability ¶ added in v0.9.0
func CheckMdsAvailability() error
func Enter ¶ added in v0.2.0
func Enter(cdir string, podPID int, appName types.ACName, stage1Path string, cmdline []string) error
Enter enters the pod/app by exec()ing the stage1's /enter similar to /init /enter can expect to have its CWD set to the app root. appName and command are supplied to /enter on argv followed by any arguments. stage1Path is the path of the stage1 rootfs
func GC ¶ added in v0.5.4
GC enters the pod by fork/exec()ing the stage1's /gc similar to /init. /gc can expect to have its CWD set to the pod root.
func MergeEnvs ¶ added in v0.4.0
func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)
MergeEnvs amends appEnv setting variables in setEnv before setting anything new from os.Environ if inheritEnv = true setEnv is expected to be in the os.Environ() key=value format
func MergeMounts ¶ added in v0.10.0
MergeMounts combines the global and per-app mount slices
Types ¶
type CommonConfig ¶ added in v0.4.0
type CommonConfig struct { Store *store.Store // store containing all of the configured application images Stage1Image types.Hash // stage1 image containing usable /init and /enter entrypoints UUID *types.UUID // UUID of the pod RootHash string // Hash of the root filesystem ManifestData string // The pod manifest data Debug bool MountLabel string // selinux label to use for fs ProcessLabel string // selinux label to use for process }
configuration shared by both Run and Prepare
type PrepareConfig ¶ added in v0.4.0
type PrepareConfig struct { *CommonConfig Apps *apps.Apps // apps to prepare InheritEnv bool // inherit parent environment into apps ExplicitEnv []string // always set these environment variables for all the apps Ports []types.ExposedPort // list of ports that rkt will expose on the host UseOverlay bool // prepare pod with overlay fs SkipTreeStoreCheck bool // skip checking the treestore before rendering PodManifest string // use the pod manifest specified by the user, this will ignore flags such as '--volume', '--port', etc. PrivateUsers *user.UidRange // User namespaces }
configuration parameters required by Prepare
type RunConfig ¶ added in v0.4.0
type RunConfig struct { *CommonConfig Net common.NetList // pod should have its own network stack LockFd int // lock file descriptor Interactive bool // whether the pod is interactive or not MDSRegister bool // whether to register with metadata service or not Apps schema.AppList // applications (prepare gets them via Apps) LocalConfig string // Path to local configuration Hostname string // hostname of the pod RktGid int // group id of the 'rkt' group, -1 if there's no rkt group. DNS []string // DNS name servers to write in /etc/resolv.conf DNSSearch []string // DNS search domains to write in /etc/resolv.conf DNSOpt []string // DNS options to write in /etc/resolv.conf }
configuration parameters needed by Run