summaryrefslogtreecommitdiff
path: root/daemon/container_windows.go
diff options
context:
space:
mode:
authorMorgan Bauer <mbauer@us.ibm.com>2015-07-30 14:01:53 -0700
committerMorgan Bauer <mbauer@us.ibm.com>2015-08-27 22:07:42 -0700
commitabd72d4008dde7ee8249170d49eb4bc963c51e24 (patch)
tree0142ad7db4031fc6aa98d4713273a0779d736c81 /daemon/container_windows.go
parent04b0fb631441b9dda4e9cb1a38b255bac65aa4e7 (diff)
downloaddocker-abd72d4008dde7ee8249170d49eb4bc963c51e24.tar.gz
golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the downcased versions already existed, and the existing functions simply had locks around the already downcased version. - deleting unused functions - package comment - magic numbers replaced by golang constants - comments all over Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Diffstat (limited to 'daemon/container_windows.go')
-rw-r--r--daemon/container_windows.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/daemon/container_windows.go b/daemon/container_windows.go
index d20615a6af..03665186c0 100644
--- a/daemon/container_windows.go
+++ b/daemon/container_windows.go
@@ -7,12 +7,15 @@ import (
"strings"
"github.com/docker/docker/daemon/execdriver"
+ "github.com/docker/docker/pkg/archive"
)
-// This is deliberately empty on Windows as the default path will be set by
+// DefaultPathEnv is deliberately empty on Windows as the default path will be set by
// the container. Docker has no context of what the default path should be.
const DefaultPathEnv = ""
+// Container holds fields specific to the Windows implementation. See
+// CommonContainer for standard fields common to all containers.
type Container struct {
CommonContainer
@@ -23,14 +26,6 @@ func killProcessDirectly(container *Container) error {
return nil
}
-func (container *Container) setupContainerDns() error {
- return nil
-}
-
-func (container *Container) updateParentsHosts() error {
- return nil
-}
-
func (container *Container) setupLinkedContainers() ([]string, error) {
return nil, nil
}
@@ -60,7 +55,7 @@ func populateCommand(c *Container, env []string) error {
if !c.Config.NetworkDisabled {
en.Interface = &execdriver.NetworkInterface{
MacAddress: c.Config.MacAddress,
- Bridge: c.daemon.config.Bridge.VirtualSwitchName,
+ Bridge: c.daemon.configStore.Bridge.VirtualSwitchName,
PortBindings: c.hostConfig.PortBindings,
// TODO Windows. Include IPAddress. There already is a
@@ -118,7 +113,7 @@ func populateCommand(c *Container, env []string) error {
// TODO Windows: Factor out remainder of unused fields.
c.command = &execdriver.Command{
ID: c.ID,
- Rootfs: c.RootfsPath(),
+ Rootfs: c.rootfsPath(),
ReadonlyRootfs: c.hostConfig.ReadonlyRootfs,
InitPath: "/.dockerinit",
WorkingDir: c.Config.WorkingDir,
@@ -128,8 +123,8 @@ func populateCommand(c *Container, env []string) error {
CapAdd: c.hostConfig.CapAdd.Slice(),
CapDrop: c.hostConfig.CapDrop.Slice(),
ProcessConfig: processConfig,
- ProcessLabel: c.GetProcessLabel(),
- MountLabel: c.GetMountLabel(),
+ ProcessLabel: c.getProcessLabel(),
+ MountLabel: c.getMountLabel(),
FirstStart: !c.HasBeenStartedBefore,
LayerFolder: layerFolder,
LayerPaths: layerPaths,
@@ -138,28 +133,33 @@ func populateCommand(c *Container, env []string) error {
return nil
}
-// GetSize, return real size, virtual size
-func (container *Container) GetSize() (int64, int64) {
+// GetSize returns real size & virtual size
+func (container *Container) getSize() (int64, int64) {
// TODO Windows
return 0, 0
}
-func (container *Container) AllocateNetwork() error {
+// allocateNetwork is a no-op on Windows.
+func (container *Container) allocateNetwork() error {
return nil
}
-func (container *Container) UpdateNetwork() error {
- return nil
+func (container *Container) exportRw() (archive.Archive, error) {
+ if container.IsRunning() {
+ return nil, fmt.Errorf("Cannot export a running container.")
+ }
+ // TODO Windows. Implementation (different to Linux)
+ return nil, nil
}
-func (container *Container) ReleaseNetwork() {
+func (container *Container) updateNetwork() error {
+ return nil
}
-func (container *Container) RestoreNetwork() error {
- return nil
+func (container *Container) releaseNetwork() {
}
-func (container *Container) UnmountVolumes(forceSyscall bool) error {
+func (container *Container) unmountVolumes(forceSyscall bool) error {
return nil
}