(deep, req, res, log, statsClient, cb)
| 88 | } |
| 89 | |
| 90 | function routeHandler(deep, req, res, log, statsClient, cb) { |
| 91 | if (!isHealthy()) { |
| 92 | return cb(errors.InternalError, []); |
| 93 | } |
| 94 | if (req.method !== 'GET' && req.method !== 'POST') { |
| 95 | return cb(errors.BadRequest, []); |
| 96 | } |
| 97 | if (!deep) { |
| 98 | return metadata.checkHealth(log, err => { |
| 99 | if (err) { |
| 100 | return cb(errors.InternalError, []); |
| 101 | } |
| 102 | return statsClient.getStats(log, 's3', cb); |
| 103 | }); |
| 104 | } |
| 105 | return clientCheck(false, log, cb); |
| 106 | } |
| 107 | |
| 108 | function checkIP(clientIP) { |
| 109 | return ipCheck.ipMatchCidrList( |
no test coverage detected