types_linux.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package libcontainerd
  2. import (
  3. containerd "github.com/containerd/containerd/api/grpc/types"
  4. "github.com/opencontainers/runtime-spec/specs-go"
  5. )
  6. // Process contains information to start a specific application inside the container.
  7. type Process struct {
  8. // Terminal creates an interactive terminal for the container.
  9. Terminal bool `json:"terminal"`
  10. // User specifies user information for the process.
  11. User *specs.User `json:"user"`
  12. // Args specifies the binary and arguments for the application to execute.
  13. Args []string `json:"args"`
  14. // Env populates the process environment for the process.
  15. Env []string `json:"env,omitempty"`
  16. // Cwd is the current working directory for the process and must be
  17. // relative to the container's root.
  18. Cwd *string `json:"cwd"`
  19. // Capabilities are linux capabilities that are kept for the container.
  20. Capabilities []string `json:"capabilities,omitempty"`
  21. // Rlimits specifies rlimit options to apply to the process.
  22. Rlimits []specs.POSIXRlimit `json:"rlimits,omitempty"`
  23. // ApparmorProfile specifies the apparmor profile for the container.
  24. ApparmorProfile *string `json:"apparmorProfile,omitempty"`
  25. // SelinuxLabel specifies the selinux context that the container process is run as.
  26. SelinuxLabel *string `json:"selinuxLabel,omitempty"`
  27. }
  28. // StateInfo contains description about the new state container has entered.
  29. type StateInfo struct {
  30. CommonStateInfo
  31. // Platform specific StateInfo
  32. OOMKilled bool
  33. }
  34. // Stats contains a stats properties from containerd.
  35. type Stats containerd.StatsResponse
  36. // Summary contains a container summary from containerd
  37. type Summary struct{}
  38. // Resources defines updatable container resource values.
  39. type Resources containerd.UpdateResource
  40. // Checkpoints contains the details of a checkpoint
  41. type Checkpoints containerd.ListCheckpointResponse