github.com/rsampaio/docker@v0.7.2-0.20150827203920-fdc73cc3fc31/runconfig/hostconfig_windows.go (about)

     1  package runconfig
     2  
     3  // IsDefault indicates whether container uses the default network stack.
     4  func (n NetworkMode) IsDefault() bool {
     5  	return n == "default"
     6  }
     7  
     8  // DefaultDaemonNetworkMode returns the default network stack the daemon should
     9  // use.
    10  func DefaultDaemonNetworkMode() NetworkMode {
    11  	return NetworkMode("default")
    12  }
    13  
    14  // NetworkName returns the name of the network stack.
    15  func (n NetworkMode) NetworkName() string {
    16  	if n.IsDefault() {
    17  		return "default"
    18  	}
    19  	return ""
    20  }
    21  
    22  // MergeConfigs merges the specified container Config and HostConfig.
    23  // It creates a ContainerConfigWrapper.
    24  func MergeConfigs(config *Config, hostConfig *HostConfig) *ContainerConfigWrapper {
    25  	return &ContainerConfigWrapper{
    26  		config,
    27  		hostConfig,
    28  	}
    29  }