types_windows.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package libcontainerd
  2. import (
  3. "github.com/Microsoft/hcsshim"
  4. "github.com/opencontainers/runtime-spec/specs-go"
  5. )
  6. // Process contains information to start a specific application inside the container.
  7. type Process specs.Process
  8. // Summary contains a ProcessList item from HCS to support `top`
  9. type Summary hcsshim.ProcessListItem
  10. // StateInfo contains description about the new state container has entered.
  11. type StateInfo struct {
  12. CommonStateInfo
  13. // Platform specific StateInfo
  14. UpdatePending bool // Indicates that there are some update operations pending that should be completed by a servicing container.
  15. }
  16. // Stats contains statics from HCS
  17. type Stats hcsshim.Statistics
  18. // Resources defines updatable container resource values.
  19. type Resources struct{}
  20. // ServicingOption is a CreateOption with a no-op application that signifies
  21. // the container needs to be used for a Windows servicing operation.
  22. type ServicingOption struct {
  23. IsServicing bool
  24. }
  25. // FlushOption is a CreateOption that signifies if the container should be
  26. // started with flushes ignored until boot has completed. This is an optimisation
  27. // for first boot of a container.
  28. type FlushOption struct {
  29. IgnoreFlushesDuringBoot bool
  30. }
  31. // HyperVIsolationOption is a CreateOption that indicates whether the runtime
  32. // should start the container as a Hyper-V container, and if so, the sandbox path.
  33. type HyperVIsolationOption struct {
  34. IsHyperV bool
  35. SandboxPath string `json:",omitempty"`
  36. }
  37. // LayerOption is a CreateOption that indicates to the runtime the layer folder
  38. // and layer paths for a container.
  39. type LayerOption struct {
  40. // LayerFolder is the path to the current layer folder. Empty for Hyper-V containers.
  41. LayerFolderPath string `json:",omitempty"`
  42. // Layer paths of the parent layers
  43. LayerPaths []string
  44. }
  45. // NetworkEndpointsOption is a CreateOption that provides the runtime list
  46. // of network endpoints to which a container should be attached during its creation.
  47. type NetworkEndpointsOption struct {
  48. Endpoints []string
  49. AllowUnqualifiedDNSQuery bool
  50. }
  51. // CredentialsOption is a CreateOption that indicates the credentials from
  52. // a credential spec to be used to the runtime
  53. type CredentialsOption struct {
  54. Credentials string
  55. }
  56. // Checkpoint holds the details of a checkpoint (not supported in windows)
  57. type Checkpoint struct {
  58. Name string
  59. }
  60. // Checkpoints contains the details of a checkpoint
  61. type Checkpoints struct {
  62. Checkpoints []*Checkpoint
  63. }