// LowLevelJSONConfig returns the config's underlying low-level JSON form
// for debugging.
//
// Deprecated: this is provided for debugging only and will be going away
// as the move to TOML-based configuration progresses. Do not depend on this.
187206
func (c *Config) LowLevelJSONConfig() map[string]interface{} {
	// Make a shallow clone of c.jconf so we can mutate the
	// handlerConfig key to make it explicitly true, without
	// modifying anybody's else view of it.
	ret := map[string]interface{}{}
	for k, v := range c.jconf {
		ret[k] = v
	}
	ret["handlerConfig"] = true
	return ret
}
9281
func SerfDefaultConfig() *serf.Config {
	base := serf.DefaultConfig()

	// This effectively disables the annoying queue depth warnings.
	base.QueueDepthWarning = 1000000

	// This enables dynamic sizing of the message queue depth based on the
	// cluster size.
	base.MinQueueDepth = 4096

	// This gives leaves some time to propagate through the cluster before
	// we shut down. The value was chosen to be reasonably short, but to
	// allow a leave to get to over 99.99% of the cluster with 100k nodes
	// (using https://www.serf.io/docs/internals/simulator.html).
	base.LeavePropagateDelay = 3 * time.Second

	return base
}
1246218
func configFromJSON(cfg jsonconfig.Obj) (config, error) {
	conf := config{
		server:     cfg.OptionalString("host", "localhost"),
		database:   cfg.RequiredString("database"),
		collection: cfg.OptionalString("collection", "blobs"),
		user:       cfg.OptionalString("user", ""),
		password:   cfg.OptionalString("password", ""),
	}
	if err := cfg.Validate(); err != nil {
		return config{}, err
	}
	return conf, nil
}
569310
func highLevelConfFields() map[string]bool {
	knownFields := make(map[string]bool)
	var c serverconfig.Config
	s := reflect.ValueOf(&c).Elem()
	for i := 0; i < s.NumField(); i++ {
		f := s.Type().Field(i)
		jsonTag, ok := f.Tag.Lookup("json")
		if !ok {
			panic(fmt.Sprintf("%q field in serverconfig.Config does not have a json tag", f.Name))
		}
		jsonFields := strings.Split(strings.TrimSuffix(strings.TrimPrefix(jsonTag, `"`), `"`), ",")
		jsonName := jsonFields[0]
		if jsonName == "" {
			panic(fmt.Sprintf("no json field name for %q field in serverconfig.Config", f.Name))
		}
		knownFields[jsonName] = true
	}
	return knownFields
}
197187
func (s *HTTPServer) Config(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
	switch req.Method {
	case "GET":
		return s.configGet(resp, req)

	case "DELETE":
		return s.configDelete(resp, req)

	default:
		return nil, MethodNotAllowedError{req.Method, []string{"GET", "DELETE"}}
	}
}
175311
func DefaultConfig() Config {
	return Config{
		Filters:        make(map[string]FilterFunction),
		Globals:        make(map[string]interface{}, 0),
		DebugTemplates: false,
	}
}
396701
func newDefaultConfig(url string, timeoutms int, config *RealisConfig) (*RealisConfig, error) {
	return newTJSONConfig(url, timeoutms, config)
}
905078
func PullerConfigFromTopLevelConfig(systemChannel string, conf *localconfig.TopLevel, tlsKey, tlsCert []byte, signer crypto.LocalSigner) PullerConfig {
	return PullerConfig{
		Channel:             systemChannel,
		MaxTotalBufferBytes: conf.General.Cluster.ReplicationBufferSize,
		Timeout:             conf.General.Cluster.RPCTimeout,
		TLSKey:              tlsKey,
		TLSCert:             tlsCert,
		Signer:              signer,
	}
}
1041132
func DefaultConfig() *Config {
	return &Config{
		Dimensionality:       8,
		VivaldiErrorMax:      1.5,
		VivaldiCE:            0.25,
		VivaldiCC:            0.25,
		AdjustmentWindowSize: 20,
		HeightMin:            10.0e-6,
		LatencyFilterSize:    3,
		GravityRho:           150.0,
	}
}
76955
func SetConfigDefaults(cfg *Config) {
	if len(cfg.LevelColors) == 0 {
		cfg.LevelColors = DefaultLevelColors
	}
	if cfg.UnknownColor == "" {
		cfg.UnknownColor = DefaultUnknownColor
	}
}
1189979
func DefaultConfig() Config {
	return Config{
		Indent:        false,
		UnEscapeHTML:  false,
		Prefix:        []byte(""),
		StreamingJSON: false,
	}
}
582093
func DefaultConfig() *Config {
	return &Config{
		MaxOpenConnections: 0, // unlimited
		ReadTimeout:        10 * time.Second,
		WriteTimeout:       10 * time.Second,
	}
}
290493
func DefaultConfig() *Config {
	return &Config{
		MetadataExtractor: nil,
		NetclsProgrammer:  nil,
		EnableHostPods:    false,
		Kubeconfig:        "",
		Nodename:          "",
	}
}
357061
func (j JujuConfigProvider) Config() (ociCommon.ConfigurationProvider, error) {
	if err := j.Validate(); err != nil {
		return nil, err
	}
	return &j, nil
}
1175664
func (s *GRPCServer) Config() string {
	// Create a buffer that will contain our final contents
	var buf bytes.Buffer

	// Wrap the base64 encoding with JSON encoding.
	if err := json.NewEncoder(&buf).Encode(s.config); err != nil {
		// We panic since ths shouldn't happen under any scenario. We
		// carefully control the structure being encoded here and it should
		// always be successful.
		panic(err)
	}

	return buf.String()
}
1318315
func DefaultConfig() *Config {
	return &Config{
		BOSHAddress:       "https://192.168.50.4:25555",
		Username:          "admin",
		Password:          "admin",
		HttpClient:        http.DefaultClient,
		SkipSslValidation: true,
	}
}
1005674
func DefaultConfig() *Config {
	return &Config{
		ClusterName:      store.DefaultClusterName,
		Keylen:           DefaultKeyLen,
		RotationInterval: DefaultKeyRotationInterval,
		Subsystems:       []string{SubsystemGossip, SubsystemIPSec},
	}
}