backend_windows.go 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // +build windows
  2. package container
  3. import (
  4. "io"
  5. "time"
  6. "github.com/docker/docker/api/types"
  7. "github.com/docker/docker/api/types/versions/v1p20"
  8. "github.com/docker/docker/daemon"
  9. "github.com/docker/docker/pkg/archive"
  10. "github.com/docker/docker/runconfig"
  11. )
  12. // Backend is all the methods that need to be implemented to provide
  13. // container specific functionality
  14. type Backend interface {
  15. ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error)
  16. ContainerAttachWithLogs(prefixOrName string, c *daemon.ContainerAttachWithLogsConfig) error
  17. ContainerChanges(name string) ([]archive.Change, error)
  18. ContainerCopy(name string, res string) (io.ReadCloser, error)
  19. ContainerCreate(params *daemon.ContainerCreateConfig) (types.ContainerCreateResponse, error)
  20. ContainerExecCreate(config *runconfig.ExecConfig) (string, error)
  21. ContainerExecInspect(id string) (*daemon.ExecConfig, error)
  22. ContainerExecResize(name string, height, width int) error
  23. ContainerExecStart(name string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) error
  24. ContainerExport(name string, out io.Writer) error
  25. ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error
  26. ContainerInspect(name string, size bool) (*types.ContainerJSON, error)
  27. ContainerInspect120(name string) (*v1p20.ContainerJSON, error)
  28. // unix version
  29. //ContainerInspectPre120(name string) (*v1p19.ContainerJSON, error)
  30. // windows version
  31. ContainerInspectPre120(name string) (*types.ContainerJSON, error)
  32. ContainerKill(name string, sig uint64) error
  33. ContainerLogs(containerName string, config *daemon.ContainerLogsConfig) error
  34. ContainerPause(name string) error
  35. ContainerRename(oldName, newName string) error
  36. ContainerResize(name string, height, width int) error
  37. ContainerRestart(name string, seconds int) error
  38. ContainerRm(name string, config *daemon.ContainerRmConfig) error
  39. Containers(config *daemon.ContainersConfig) ([]*types.Container, error)
  40. ContainerStart(name string, hostConfig *runconfig.HostConfig) error
  41. ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error)
  42. ContainerStats(prefixOrName string, config *daemon.ContainerStatsConfig) error
  43. ContainerStop(name string, seconds int) error
  44. ContainerTop(name string, psArgs string) (*types.ContainerProcessList, error)
  45. ContainerUnpause(name string) error
  46. ContainerWait(name string, timeout time.Duration) (int, error)
  47. ContainerWsAttachWithLogs(prefixOrName string, c *daemon.ContainerWsAttachWithLogsConfig) error
  48. ExecExists(name string) (bool, error)
  49. Exists(id string) bool
  50. IsPaused(id string) bool
  51. }