forked from cloudfoundry/guardian
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move {Actual|Desired}ContainerSpec to own package
[#155638517] Signed-off-by: Tom Godkin <[email protected]>
- Loading branch information
1 parent
ad77efc
commit 8745192
Showing
33 changed files
with
310 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package spec | ||
|
||
import ( | ||
"code.cloudfoundry.org/garden" | ||
specs "github.com/opencontainers/runtime-spec/specs-go" | ||
) | ||
|
||
type ActualContainerSpec struct { | ||
// The PID of the container's init process | ||
Pid int | ||
|
||
// The path to the container's bundle directory | ||
BundlePath string | ||
|
||
// The path to the container's rootfs | ||
RootFSPath string | ||
|
||
// Whether the container is stopped | ||
Stopped bool | ||
|
||
// Process IDs (not PIDs) of processes in the container | ||
ProcessIDs []string | ||
|
||
// Events (e.g. OOM) which have occured in the container | ||
Events []string | ||
|
||
// Applied limits | ||
Limits garden.Limits | ||
|
||
// Whether the container is privileged | ||
Privileged bool | ||
} | ||
|
||
type DesiredContainerSpec struct { | ||
Handle string | ||
|
||
CgroupPath string | ||
|
||
Namespaces map[string]string | ||
|
||
// Container hostname | ||
Hostname string | ||
|
||
// Bind mounts | ||
BindMounts []garden.BindMount | ||
|
||
Env []string | ||
|
||
// Container is privileged | ||
Privileged bool | ||
|
||
Limits garden.Limits | ||
|
||
BaseConfig specs.Spec | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.