Adds a database to the ServerContext given its configuration. If an existing config is found for the name, returns an error.
(ctx context.Context, config DatabaseConfig)
| 1616 | // Adds a database to the ServerContext given its configuration. If an existing config is found |
| 1617 | // for the name, returns an error. |
| 1618 | func (sc *ServerContext) AddDatabaseFromConfig(ctx context.Context, config DatabaseConfig) (*db.DatabaseContext, error) { |
| 1619 | failFast := false |
| 1620 | return sc.getOrAddDatabaseFromConfig(ctx, config, getOrAddDatabaseConfigOptions{useExisting: false, failFast: failFast}) |
| 1621 | } |
| 1622 | |
| 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. |