(ctx context.Context, dbName string)
| 1860 | } |
| 1861 | |
| 1862 | func (sc *ServerContext) _fetchDatabase(ctx context.Context, dbName string) (found bool, dbConfig *DatabaseConfig, err error) { |
| 1863 | var cnf DatabaseConfig |
| 1864 | callback := func(bucket string) (exit bool, callbackErr error) { |
| 1865 | var foundInBucket bool |
| 1866 | foundInBucket, cnf, callbackErr = sc._fetchDatabaseFromBucket(ctx, bucket, dbName) |
| 1867 | return foundInBucket, callbackErr |
| 1868 | } |
| 1869 | |
| 1870 | err = sc.findBucketWithCallback(callback) |
| 1871 | |
| 1872 | if err != nil { |
| 1873 | return false, nil, err |
| 1874 | } |
| 1875 | |
| 1876 | return true, &cnf, nil |
| 1877 | } |
| 1878 | |
| 1879 | func (sc *ServerContext) handleInvalidDatabaseConfig(ctx context.Context, bucket string, cnf DatabaseConfig) { |
| 1880 | sc._databasesLock.Lock() |
no test coverage detected