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

Method CreateLocalDatabase

rest/server_context.go:131–143  ·  view source on GitHub ↗
(ctx context.Context, dbs DbConfigMap)

Source from the content-addressed store, hash-verified

129}
130
131func (sc *ServerContext) CreateLocalDatabase(ctx context.Context, dbs DbConfigMap) error {
132 for _, dbConfig := range dbs {
133 dbc := dbConfig.ToDatabaseConfig()
134 _, err := sc._getOrAddDatabaseFromConfig(ctx, *dbc, getOrAddDatabaseConfigOptions{
135 useExisting: false,
136 failFast: false,
137 })
138 if err != nil {
139 return err
140 }
141 }
142 return nil
143}
144
145func (sc *ServerContext) SetCpuPprofFile(file *os.File) {
146 sc.cpuPprofFileMutex.Lock()

Callers 1

legacyServerMainFunction · 0.80

Calls 2

ToDatabaseConfigMethod · 0.80

Tested by

no test coverage detected