(buf []byte)
| 1278 | } |
| 1279 | |
| 1280 | func (s *SlowResponseRecorder) Write(buf []byte) (int, error) { |
| 1281 | |
| 1282 | s.responseStarted.Done() |
| 1283 | |
| 1284 | time.Sleep(s.responseDelay) |
| 1285 | |
| 1286 | numBytesWritten, err := s.ResponseRecorder.Write(buf) |
| 1287 | |
| 1288 | s.responseFinished.Done() |
| 1289 | |
| 1290 | return numBytesWritten, err |
| 1291 | } |
| 1292 | |
| 1293 | // AddDatabaseFromConfigWithBucket adds a database to the ServerContext and sets a specific bucket on the database context. |
| 1294 | // If an existing config is found for the name, returns an error. |