github.com/portworx/docker@v1.12.1/daemon/config_windows.go (about)

     1  package daemon
     2  
     3  import (
     4  	"os"
     5  
     6  	flag "github.com/docker/docker/pkg/mflag"
     7  	"github.com/docker/engine-api/types"
     8  )
     9  
    10  var (
    11  	defaultPidFile = os.Getenv("programdata") + string(os.PathSeparator) + "docker.pid"
    12  	defaultGraph   = os.Getenv("programdata") + string(os.PathSeparator) + "docker"
    13  )
    14  
    15  // bridgeConfig stores all the bridge driver specific
    16  // configuration.
    17  type bridgeConfig struct {
    18  	commonBridgeConfig
    19  }
    20  
    21  // Config defines the configuration of a docker daemon.
    22  // These are the configuration settings that you pass
    23  // to the docker daemon when you launch it with say: `docker daemon -e windows`
    24  type Config struct {
    25  	CommonConfig
    26  
    27  	// Fields below here are platform specific. (There are none presently
    28  	// for the Windows daemon.)
    29  }
    30  
    31  // InstallFlags adds command-line options to the top-level flag parser for
    32  // the current process.
    33  // Subsequent calls to `flag.Parse` will populate config with values parsed
    34  // from the command-line.
    35  func (config *Config) InstallFlags(cmd *flag.FlagSet, usageFn func(string) string) {
    36  	// First handle install flags which are consistent cross-platform
    37  	config.InstallCommonFlags(cmd, usageFn)
    38  
    39  	// Then platform-specific install flags.
    40  	cmd.StringVar(&config.bridgeConfig.FixedCIDR, []string{"-fixed-cidr"}, "", usageFn("IPv4 subnet for fixed IPs"))
    41  	cmd.StringVar(&config.bridgeConfig.Iface, []string{"b", "-bridge"}, "", "Attach containers to a virtual switch")
    42  	cmd.StringVar(&config.SocketGroup, []string{"G", "-group"}, "", usageFn("Users or groups that can access the named pipe"))
    43  }
    44  
    45  // GetRuntime returns the runtime path and arguments for a given
    46  // runtime name
    47  func (config *Config) GetRuntime(name string) *types.Runtime {
    48  	return nil
    49  }
    50  
    51  // GetDefaultRuntimeName returns the current default runtime
    52  func (config *Config) GetDefaultRuntimeName() string {
    53  	return stockRuntimeName
    54  }
    55  
    56  // GetAllRuntimes returns a copy of the runtimes map
    57  func (config *Config) GetAllRuntimes() map[string]types.Runtime {
    58  	return map[string]types.Runtime{}
    59  }
    60  
    61  // GetExecRoot returns the user configured Exec-root
    62  func (config *Config) GetExecRoot() string {
    63  	return ""
    64  }
    65  
    66  func (config *Config) isSwarmCompatible() error {
    67  	return nil
    68  }