Documentation ¶
Index ¶
- func Enter(cdir string, podPID int, imageID *types.Hash, stage1Path string, ...) error
- func GC(pdir string, uuid *types.UUID, stage1Path string, debug bool) error
- func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)
- func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error
- func Run(cfg RunConfig, dir string)
- type CommonConfig
- type PrepareConfig
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enter ¶ added in v0.2.0
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. imageID 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. stage1Path is the path of the stage1 rootfs
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
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 PodsDir string // root directory for rkt pods Debug bool }
configuration shared by both Run and Prepare
type PrepareConfig ¶ added in v0.4.0
type PrepareConfig struct { CommonConfig // TODO(jonboulle): These images are partially-populated hashes, this should be clarified. Apps *apps.Apps // apps to prepare InheritEnv bool // inherit parent environment into apps ExplicitEnv []string // always set these environment variables for all the apps Volumes []types.Volume // list of volumes that rkt can provide to applications Ports []types.ExposedPort // list of ports that rkt will expose on the host UseOverlay bool // prepare pod with overlay fs PodManifest string // use the pod manifest specified by the user, this will ignore flags such as '--volume', '--port', etc. }
configuration parameters required by Prepare
type RunConfig ¶ added in v0.4.0
type RunConfig struct { CommonConfig PrivateNet bool // pod should have its own network stack LockFd int // lock file descriptor Interactive bool // whether the pod is interactive or not Images []types.Hash // application images (prepare gets them via Apps) }
configuration parameters needed by Run