// NewDefaultPoolConfig return a ObjectPoolConfig instance init with default value.
336299
func NewDefaultPoolConfig() *ObjectPoolConfig {
	return &ObjectPoolConfig{
		LIFO:                     DefaultLIFO,
		MaxTotal:                 DefaultMaxTotal,
		MaxIdle:                  DefaultMaxIdle,
		MinIdle:                  DefaultMinIdle,
		MinEvictableIdleTime:     DefaultMinEvictableIdleTime,
		SoftMinEvictableIdleTime: DefaultSoftMinEvictableIdleTime,
		NumTestsPerEvictionRun:   DefaultNumTestsPerEvictionRun,
		EvictionPolicyName:       DefaultEvictionPolicyName,
		EvitionContext:           context.Background(),
		TestOnCreate:             DefaultTestOnCreate,
		TestOnBorrow:             DefaultTestOnBorrow,
		TestOnReturn:             DefaultTestOnReturn,
		TestWhileIdle:            DefaultTestWhileIdle,
		TimeBetweenEvictionRuns:  DefaultTimeBetweenEvictionRuns,
		BlockWhenExhausted:       DefaultBlockWhenExhausted}
}
656482
func DefaultConfig(persister Persister, comparator Comparator) Config {
	return Config{
		NodeWidth:  10000,
		Persister:  persister,
		Comparator: comparator,
	}
}
1290805
func NewWithDefaults(
	serverID string,
	collector collector.EventCollector,
	service packetprocessor.PacketProcessor,
	secrets secrets.Secrets,
	mode constants.ModeType,
	procMountPoint string,
	targetNetworks []string,
) *Datapath {

	if collector == nil {
		zap.L().Fatal("Collector must be given to NewDefaultDatapathEnforcer")
	}

	defaultMutualAuthorization := false
	defaultFQConfig := fqconfig.NewFilterQueueWithDefaults()
	defaultValidity := time.Hour * 8760
	defaultExternalIPCacheTimeout, err := time.ParseDuration(enforcerconstants.DefaultExternalIPTimeout)
	if err != nil {
		defaultExternalIPCacheTimeout = time.Second
	}
	defaultPacketLogs := false

	tokenAccessor, err := tokenaccessor.New(serverID, defaultValidity, secrets)
	if err != nil {
		zap.L().Fatal("Cannot create a token engine", zap.Error(err))
	}

	puFromContextID := cache.NewCache("puFromContextID")

	e := New(
		defaultMutualAuthorization,
		defaultFQConfig,
		collector,
		serverID,
		defaultValidity,
		service,
		secrets,
		mode,
		procMountPoint,
		defaultExternalIPCacheTimeout,
		defaultPacketLogs,
		tokenAccessor,
		puFromContextID,
		&runtime.Configuration{TCPTargetNetworks: targetNetworks},
	)

	conntrackClient, err := flowtracking.NewClient(context.Background())
	if err != nil {
		return nil
	}
	e.conntrack = conntrackClient

	return e
}
595327
func NewDefaultAbandonedConfig() *AbandonedConfig {
	return &AbandonedConfig{RemoveAbandonedOnBorrow: false, RemoveAbandonedOnMaintenance: false, RemoveAbandonedTimeout: 5 * time.Minute}
}
604135
func NewDefaultType(in interface{}, context *compiler.Context) (*DefaultType, error) {
	errors := make([]error, 0)
	x := &DefaultType{}
	matched := false
	switch in := in.(type) {
	case bool:
		x.Oneof = &DefaultType_Boolean{Boolean: in}
		matched = true
	case string:
		x.Oneof = &DefaultType_String_{String_: in}
		matched = true
	case int64:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case int32:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case int:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case float64:
		x.Oneof = &DefaultType_Number{Number: in}
		matched = true
	case float32:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	}
	if matched {
		// since the oneof matched one of its possibilities, discard any matching errors
		errors = make([]error, 0)
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
460306
func (s *CreateFunctionDefinitionVersionInput) SetDefaultConfig(v *FunctionDefaultConfig) *CreateFunctionDefinitionVersionInput {
	s.DefaultConfig = v
	return s
}
951420
func GetDefaultConfig() *Config {
	return &Config{
		ListenAddr:        defaultListenAddr,
		ListenPort:        defaultListenPort,
		MaxRunningPlugins: defaultMaxRunningPlugins,
		PluginLoadTimeout: defaultPluginLoadTimeout,
		PluginTrust:       defaultPluginTrust,
		AutoDiscoverPath:  defaultAutoDiscoverPath,
		KeyringPaths:      defaultKeyringPaths,
		CacheExpiration:   jsonutil.Duration{defaultCacheExpiration},
		Plugins:           newPluginConfig(),
		Tags:              newPluginTags(),
		Pprof:             defaultPprof,
		MaxPluginRestarts: MaxPluginRestartCount,
		TempDirPath:       defaultTempDirPath,
		TLSCertPath:       defaultTLSCertPath,
		TLSKeyPath:        defaultTLSKeyPath,
		CACertPaths:       defaultCACertPaths,
	}
}
322257
func NewDefaultComponentConfig(insecurePort int32) (kubectrlmgrconfig.KubeControllerManagerConfiguration, error) {
	versioned := kubectrlmgrconfigv1alpha1.KubeControllerManagerConfiguration{}
	kubectrlmgrconfigscheme.Scheme.Default(&versioned)

	internal := kubectrlmgrconfig.KubeControllerManagerConfiguration{}
	if err := kubectrlmgrconfigscheme.Scheme.Convert(&versioned, &internal, nil); err != nil {
		return internal, err
	}
	internal.Generic.Port = insecurePort
	return internal, nil
}
940903
func dqDefaultConfig() dqConfig {
	return dqConfig{
		minParallelism: DefaultDialQueueMinParallelism,
		maxParallelism: DefaultDialQueueMaxParallelism,
		scalingFactor:  DefaultDialQueueScalingFactor,
		maxIdle:        DefaultDialQueueMaxIdle,
		mutePeriod:     DefaultDialQueueScalingMutePeriod,
	}
}
392577
func NewDefaults() (*args.GeneratorArgs, *CustomArgs) {
	genericArgs := args.Default().WithoutDefaultFlagParsing()
	customArgs := &CustomArgs{}
	genericArgs.CustomArgs = (*generators.CustomArgs)(customArgs) // convert to upstream type to make type-casts work there
	genericArgs.OutputFileBaseName = "deepcopy_generated"
	return genericArgs, customArgs
}
396701
func newDefaultConfig(url string, timeoutms int, config *RealisConfig) (*RealisConfig, error) {
	return newTJSONConfig(url, timeoutms, config)
}
949188
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("ALICLOUD_TTL", 600),
		PropagationTimeout: env.GetOrDefaultSecond("ALICLOUD_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("ALICLOUD_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		HTTPTimeout:        env.GetOrDefaultSecond("ALICLOUD_HTTP_TIMEOUT", 10*time.Second),
	}
}
1015893
func (e *ebsProvider) DefaultPools() []*storage.Config {
	ssdPool, _ := storage.NewConfig("ebs-ssd", EBS_ProviderType, map[string]interface{}{
		EBS_VolumeType: volumeAliasSSD,
	})
	return []*storage.Config{ssdPool}
}
233954
func DefaultConfig() Config {
	return Config{
		Network:     DefaultRedisNetwork,
		Addr:        DefaultRedisAddr,
		Password:    "",
		Database:    "",
		MaxIdle:     0,
		MaxActive:   0,
		IdleTimeout: DefaultRedisIdleTimeout,
		Prefix:      "",
	}
}
108626
func NewDefaultConfig() *Config {
	return &Config{
		IdentityEndpoint:   env.GetOrDefaultString("OTC_IDENTITY_ENDPOINT", defaultIdentityEndpoint),
		PropagationTimeout: env.GetOrDefaultSecond("OTC_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("OTC_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		TTL:                env.GetOrDefaultInt("OTC_TTL", minTTL),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("OTC_HTTP_TIMEOUT", 10*time.Second),
			Transport: &http.Transport{
				Proxy: http.ProxyFromEnvironment,
				DialContext: (&net.Dialer{
					Timeout:   30 * time.Second,
					KeepAlive: 30 * time.Second,
					DualStack: true,
				}).DialContext,
				MaxIdleConns:          100,
				IdleConnTimeout:       90 * time.Second,
				TLSHandshakeTimeout:   10 * time.Second,
				ExpectContinueTimeout: 1 * time.Second,

				// Workaround for keep alive bug in otc api
				DisableKeepAlives: true,
			},
		},
	}
}
31587
func SetupDefaultConfig(dockerConfig *Config) *Config {

	defaultConfig := DefaultConfig()

	if dockerConfig.EventMetadataExtractor == nil {
		dockerConfig.EventMetadataExtractor = defaultConfig.EventMetadataExtractor
	}
	if dockerConfig.SocketType == "" {
		dockerConfig.SocketType = defaultConfig.SocketType
	}
	if dockerConfig.SocketAddress == "" {
		dockerConfig.SocketAddress = defaultConfig.SocketAddress
	}
	return dockerConfig
}
512490
func NewDefaultConfig() *Config {
	return &Config{
		Debug:              env.GetOrDefaultBool("GCE_DEBUG", false),
		TTL:                env.GetOrDefaultInt("GCE_TTL", dns01.DefaultTTL),
		PropagationTimeout: env.GetOrDefaultSecond("GCE_PROPAGATION_TIMEOUT", 180*time.Second),
		PollingInterval:    env.GetOrDefaultSecond("GCE_POLLING_INTERVAL", 5*time.Second),
	}
}