types_windows.go 2.6 KB

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