github.com/circular-dark/docker@v1.7.0/daemon/execdriver/windows/windows.go (about)

     1  // +build windows
     2  
     3  /*
     4   This is the Windows driver for containers.
     5  
     6   TODO Windows: It is currently a placeholder to allow compilation of the
     7   daemon. Future PRs will have an implementation of this driver.
     8  */
     9  
    10  package windows
    11  
    12  import (
    13  	"fmt"
    14  
    15  	"github.com/docker/docker/daemon/execdriver"
    16  )
    17  
    18  const (
    19  	DriverName = "Windows"
    20  	Version    = "Placeholder"
    21  )
    22  
    23  type activeContainer struct {
    24  	command *execdriver.Command
    25  }
    26  
    27  type driver struct {
    28  	root     string
    29  	initPath string
    30  }
    31  
    32  type info struct {
    33  	ID     string
    34  	driver *driver
    35  }
    36  
    37  func NewDriver(root, initPath string) (*driver, error) {
    38  	return &driver{
    39  		root:     root,
    40  		initPath: initPath,
    41  	}, nil
    42  }
    43  
    44  func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallback execdriver.StartCallback) (execdriver.ExitStatus, error) {
    45  	return execdriver.ExitStatus{ExitCode: 0}, nil
    46  }
    47  
    48  func (d *driver) Terminate(p *execdriver.Command) error {
    49  	return nil
    50  }
    51  
    52  func (d *driver) Kill(p *execdriver.Command, sig int) error {
    53  	return nil
    54  }
    55  
    56  func kill(ID string, PID int) error {
    57  	return nil
    58  }
    59  
    60  func (d *driver) Pause(c *execdriver.Command) error {
    61  	return fmt.Errorf("Windows: Containers cannot be paused")
    62  }
    63  
    64  func (d *driver) Unpause(c *execdriver.Command) error {
    65  	return fmt.Errorf("Windows: Containers cannot be paused")
    66  }
    67  
    68  func (i *info) IsRunning() bool {
    69  	return false
    70  }
    71  
    72  func (d *driver) Info(id string) execdriver.Info {
    73  	return &info{
    74  		ID:     id,
    75  		driver: d,
    76  	}
    77  }
    78  
    79  func (d *driver) Name() string {
    80  	return fmt.Sprintf("%s Date %s", DriverName, Version)
    81  }
    82  
    83  func (d *driver) GetPidsForContainer(id string) ([]int, error) {
    84  	return nil, fmt.Errorf("GetPidsForContainer: GetPidsForContainer() not implemented")
    85  }
    86  
    87  func (d *driver) Clean(id string) error {
    88  	return nil
    89  }
    90  
    91  func (d *driver) Stats(id string) (*execdriver.ResourceStats, error) {
    92  	return nil, fmt.Errorf("Windows: Stats not implemented")
    93  }
    94  
    95  func (d *driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, startCallback execdriver.StartCallback) (int, error) {
    96  	return 0, nil
    97  }