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

Method AddDatabaseFromConfigFailFast

rest/server_context.go:1625–1628  ·  view source on GitHub ↗

AddDatabaseFromConfigFailFast adds a database to the ServerContext given its configuration and fails fast. If an existing config is found for the name, returns an error.

(nonContextStruct base.NonCancellableContext, config DatabaseConfig)

Source from the content-addressed store, hash-verified

1623// AddDatabaseFromConfigFailFast adds a database to the ServerContext given its configuration and fails fast.
1624// If an existing config is found for the name, returns an error.
1625func (sc *ServerContext) AddDatabaseFromConfigFailFast(nonContextStruct base.NonCancellableContext, config DatabaseConfig) (*db.DatabaseContext, error) {
1626 failFast := true
1627 return sc.getOrAddDatabaseFromConfig(nonContextStruct.Ctx, config, getOrAddDatabaseConfigOptions{useExisting: false, failFast: failFast})
1628}
1629
1630func (sc *ServerContext) processEventHandlersForEvent(ctx context.Context, events []*EventConfig, eventType db.EventType, dbcontext *db.DatabaseContext) error {
1631

Callers 1

handleCreateDBMethod · 0.80

Calls 1

Tested by

no test coverage detected