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 statistics 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.
  33. type HyperVIsolationOption struct {
  34. IsHyperV bool
  35. }
  36. // LayerOption is a CreateOption that indicates to the runtime the layer folder
  37. // and layer paths for a container.
  38. type LayerOption struct {
  39. // LayerFolderPath is the path to the current layer folder. Empty for Hyper-V containers.
  40. LayerFolderPath string `json:",omitempty"`
  41. // Layer paths of the parent layers
  42. LayerPaths []string
  43. }
  44. // NetworkEndpointsOption is a CreateOption that provides the runtime list
  45. // of network endpoints to which a container should be attached during its creation.
  46. type NetworkEndpointsOption struct {
  47. Endpoints []string
  48. AllowUnqualifiedDNSQuery bool
  49. DNSSearchList []string
  50. NetworkSharedContainerID string
  51. }
  52. // CredentialsOption is a CreateOption that indicates the credentials from
  53. // a credential spec to be used to the runtime
  54. type CredentialsOption struct {
  55. Credentials string
  56. }
  57. // Checkpoint holds the details of a checkpoint (not supported in windows)
  58. type Checkpoint struct {
  59. Name string
  60. }
  61. // Checkpoints contains the details of a checkpoint
  62. type Checkpoints struct {
  63. Checkpoints []*Checkpoint
  64. }