MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / MergeDatabaseConfigWithDefaults

Function MergeDatabaseConfigWithDefaults

rest/config_database.go:111–120  ·  view source on GitHub ↗

MergeDatabaseConfigWithDefaults merges the passed in config onto a DefaultDbConfig which results in returned value being populated with defaults when not set

(sc *StartupConfig, dbConfig *DbConfig)

Source from the content-addressed store, hash-verified

109// MergeDatabaseConfigWithDefaults merges the passed in config onto a DefaultDbConfig which results in returned value
110// being populated with defaults when not set
111func MergeDatabaseConfigWithDefaults(sc *StartupConfig, dbConfig *DbConfig) (*DbConfig, error) {
112 defaultDbConfig := DefaultDbConfig(sc, dbConfig.UseXattrs())
113
114 err := base.ConfigMerge(defaultDbConfig, dbConfig)
115 if err != nil {
116 return nil, err
117 }
118
119 return defaultDbConfig, nil
120}
121
122// DefaultDbConfig provides a DbConfig with all the default values populated. Used with MergeDatabaseConfigWithDefaults
123// to provide defaults to include_runtime config endpoints.

Callers 3

handleGetDbConfigMethod · 0.85
handleGetConfigMethod · 0.85

Calls 3

ConfigMergeFunction · 0.92
DefaultDbConfigFunction · 0.85
UseXattrsMethod · 0.45

Tested by

no test coverage detected