agent/config/config_windows.go
func DefaultConfig() Config {
	programData := utils.DefaultIfBlank(os.Getenv("ProgramData"), `C:\ProgramData`)
	ecsRoot := filepath.Join(programData, "Amazon", "ECS")
	dataDir := filepath.Join(ecsRoot, "data")
	platformVariables := PlatformVariables{
		CPUUnbounded: false,
	}
	return Config{
		DockerEndpoint: "npipe:////./pipe/docker_engine",
		ReservedPorts: []uint16{
			DockerReservedPort,
			DockerReservedSSLPort,
			AgentIntrospectionPort,
			AgentCredentialsPort,
			rdpPort,
			rpcPort,
			smbPort,
			winRMPortHTTP,
			winRMPortHTTPS,
			dnsPort,
			netBIOSPort,
		},
		ReservedPortsUDP: []uint16{},
		DataDir:          dataDir,
		// DataDirOnHost is identical to DataDir for Windows because we do not
		// run as a container
		DataDirOnHost:                       dataDir,
		ReservedMemory:                      0,
		AvailableLoggingDrivers:             []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver, dockerclient.AWSLogsDriver},
		TaskCleanupWaitDuration:             DefaultTaskCleanupWaitDuration,
		DockerStopTimeout:                   defaultDockerStopTimeout,
		ContainerStartTimeout:               defaultContainerStartTimeout,
		ImagePullInactivityTimeout:          defaultImagePullInactivityTimeout,
		CredentialsAuditLogFile:             filepath.Join(ecsRoot, defaultCredentialsAuditLogFile),
		CredentialsAuditLogDisabled:         false,
		ImageCleanupDisabled:                false,
		MinimumImageDeletionAge:             DefaultImageDeletionAge,
		ImageCleanupInterval:                DefaultImageCleanupTimeInterval,
		NumImagesToDeletePerCycle:           DefaultNumImagesToDeletePerCycle,
		NumNonECSContainersToDeletePerCycle: DefaultNumNonECSContainersToDeletePerCycle,
		ContainerMetadataEnabled:            false,
		TaskCPUMemLimit:                     ExplicitlyDisabled,
		PlatformVariables:                   platformVariables,
		TaskMetadataSteadyStateRate:         DefaultTaskMetadataSteadyStateRate,
		TaskMetadataBurstRate:               DefaultTaskMetadataBurstRate,
		SharedVolumeMatchFullConfig:         false, //only requiring shared volumes to match on name, which is default docker behavior
		PollMetrics:                         false,
		PollingMetricsWaitDuration:          DefaultPollingMetricsWaitDuration,
	}
}
func DefaultConfig() Config {
	programData := utils.DefaultIfBlank(os.Getenv("ProgramData"), `C:\ProgramData`)
	ecsRoot := filepath.Join(programData, "Amazon", "ECS")
	dataDir := filepath.Join(ecsRoot, "data")
	platformVariables := PlatformVariables{
		CPUUnbounded: false,
	}
	return Config{
		DockerEndpoint: "npipe:////./pipe/docker_engine",
		ReservedPorts: []uint16{
			DockerReservedPort,
			DockerReservedSSLPort,
			AgentIntrospectionPort,
			AgentCredentialsPort,
			rdpPort,
			rpcPort,
			smbPort,
			winRMPortHTTP,
			winRMPortHTTPS,
			dnsPort,
			netBIOSPort,
		},
		ReservedPortsUDP: []uint16{},
		DataDir:          dataDir,
		// DataDirOnHost is identical to DataDir for Windows because we do not
		// run as a container
		DataDirOnHost:                       dataDir,
		ReservedMemory:                      0,
		AvailableLoggingDrivers:             []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver, dockerclient.AWSLogsDriver},
		TaskCleanupWaitDuration:             DefaultTaskCleanupWaitDuration,
		DockerStopTimeout:                   defaultDockerStopTimeout,
		ContainerStartTimeout:               defaultContainerStartTimeout,
		ImagePullInactivityTimeout:          defaultImagePullInactivityTimeout,
		CredentialsAuditLogFile:             filepath.Join(ecsRoot, defaultCredentialsAuditLogFile),
		CredentialsAuditLogDisabled:         false,
		ImageCleanupDisabled:                false,
		MinimumImageDeletionAge:             DefaultImageDeletionAge,
		ImageCleanupInterval:                DefaultImageCleanupTimeInterval,
		NumImagesToDeletePerCycle:           DefaultNumImagesToDeletePerCycle,
		NumNonECSContainersToDeletePerCycle: DefaultNumNonECSContainersToDeletePerCycle,
		ContainerMetadataEnabled:            false,
		TaskCPUMemLimit:                     ExplicitlyDisabled,
		PlatformVariables:                   platformVariables,
		TaskMetadataSteadyStateRate:         DefaultTaskMetadataSteadyStateRate,
		TaskMetadataBurstRate:               DefaultTaskMetadataBurstRate,
		SharedVolumeMatchFullConfig:         false, //only requiring shared volumes to match on name, which is default docker behavior
		PollMetrics:                         false,
		PollingMetricsWaitDuration:          DefaultPollingMetricsWaitDuration,
	}
}
func DefaultConfig ( ) Config { programData := utils . DefaultIfBlank ( os . Getenv ( " " ) , `C:\ProgramData` ) ecsRoot := filepath . Join ( programData , " " , " " ) dataDir := filepath . Join ( ecsRoot , " " ) platformVariables := PlatformVariables { CPUUnbounded : false , } return Config { DockerEndpoint : " " , ReservedPorts : [ ] uint16 { DockerReservedPort , DockerReservedSSLPort , AgentIntrospectionPort , AgentCredentialsPort , rdpPort , rpcPort , smbPort , winRMPortHTTP , winRMPortHTTPS , dnsPort , netBIOSPort , } , ReservedPortsUDP : [ ] uint16 { } , DataDir : dataDir , // DataDirOnHost is identical to DataDir for Windows because we do not // run as a container DataDirOnHost : dataDir , ReservedMemory : 0 , AvailableLoggingDrivers : [ ] dockerclient . LoggingDriver { dockerclient . JSONFileDriver , dockerclient . NoneDriver , dockerclient . AWSLogsDriver } , TaskCleanupWaitDuration : DefaultTaskCleanupWaitDuration , DockerStopTimeout : defaultDockerStopTimeout , ContainerStartTimeout : defaultContainerStartTimeout , ImagePullInactivityTimeout : defaultImagePullInactivityTimeout , CredentialsAuditLogFile : filepath . Join ( ecsRoot , defaultCredentialsAuditLogFile ) , CredentialsAuditLogDisabled : false , ImageCleanupDisabled : false , MinimumImageDeletionAge : DefaultImageDeletionAge , ImageCleanupInterval : DefaultImageCleanupTimeInterval , NumImagesToDeletePerCycle : DefaultNumImagesToDeletePerCycle , NumNonECSContainersToDeletePerCycle : DefaultNumNonECSContainersToDeletePerCycle , ContainerMetadataEnabled : false , TaskCPUMemLimit : ExplicitlyDisabled , PlatformVariables : platformVariables , TaskMetadataSteadyStateRate : DefaultTaskMetadataSteadyStateRate , TaskMetadataBurstRate : DefaultTaskMetadataBurstRate , SharedVolumeMatchFullConfig : false , //only requiring shared volumes to match on name, which is default docker behavior PollMetrics : false , PollingMetricsWaitDuration : DefaultPollingMetricsWaitDuration , } }
// DefaultConfig returns the default configuration for Windows
DefaultConfig returns the default configuration for Windows