driver_windows.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package execdriver
  2. import "github.com/docker/go-connections/nat"
  3. // Mount contains information for a mount operation.
  4. type Mount struct {
  5. Source string `json:"source"`
  6. Destination string `json:"destination"`
  7. Writable bool `json:"writable"`
  8. }
  9. // Resources contains all resource configs for a driver.
  10. // Currently these are all for cgroup configs.
  11. type Resources struct {
  12. CommonResources
  13. // Fields below here are platform specific
  14. }
  15. // ProcessConfig is the platform specific structure that describes a process
  16. // that will be run inside a container.
  17. type ProcessConfig struct {
  18. CommonProcessConfig
  19. // Fields below here are platform specific
  20. ConsoleSize [2]int `json:"-"` // h,w of initial console size
  21. }
  22. // Network settings of the container
  23. type Network struct {
  24. Interface *NetworkInterface `json:"interface"`
  25. ContainerID string `json:"container_id"` // id of the container to join network.
  26. }
  27. // NetworkInterface contains network configs for a driver
  28. type NetworkInterface struct {
  29. MacAddress string `json:"mac"`
  30. Bridge string `json:"bridge"`
  31. IPAddress string `json:"ip"`
  32. // PortBindings is the port mapping between the exposed port in the
  33. // container and the port on the host.
  34. PortBindings nat.PortMap `json:"port_bindings"`
  35. }
  36. // Command wraps an os/exec.Cmd to add more metadata
  37. type Command struct {
  38. CommonCommand
  39. // Fields below here are platform specific
  40. FirstStart bool `json:"first_start"` // Optimization for first boot of Windows
  41. Hostname string `json:"hostname"` // Windows sets the hostname in the execdriver
  42. LayerFolder string `json:"layer_folder"` // Layer folder for a command
  43. LayerPaths []string `json:"layer_paths"` // Layer paths for a command
  44. Isolation string `json:"isolation"` // Isolation technology for the container
  45. ArgsEscaped bool `json:"args_escaped"` // True if args are already escaped
  46. HvPartition bool `json:"hv_partition"` // True if it's an hypervisor partition
  47. EpList []string `json:"endpoints"` // List of network endpoints for HNS
  48. }
  49. // ExitStatus provides exit reasons for a container.
  50. type ExitStatus struct {
  51. // The exit code with which the container exited.
  52. ExitCode int
  53. }