MCPcopy
hub / github.com/scality/cloudserver / handleResult

Function handleResult

lib/api/bucketGet.js:258–275  ·  view source on GitHub ↗
(listParams, requestMaxKeys, encoding, authInfo, bucketName, list, log)

Source from the content-addressed store, hash-verified

256}
257
258function handleResult(listParams, requestMaxKeys, encoding, authInfo, bucketName, list, log) {
259 // eslint-disable-next-line no-param-reassign
260 listParams.maxKeys = requestMaxKeys;
261 // eslint-disable-next-line no-param-reassign
262 listParams.encoding = encoding;
263
264 let res;
265 if (listParams.listingType === 'DelimiterVersions') {
266 res = processVersions(bucketName, listParams, list);
267 } else {
268 res = processMasterVersions(bucketName, listParams, list);
269 }
270
271 pushMetric('listBucket', log, { authInfo, bucket: bucketName });
272 monitoring.promMetrics('GET', bucketName, '200', 'listBucket');
273
274 return res;
275}
276
277/**
278 * bucketGet - Return list of objects in bucket, supports v1 & v2

Callers 1

bucketGetFunction · 0.70

Calls 3

processVersionsFunction · 0.85
processMasterVersionsFunction · 0.85
pushMetricFunction · 0.85

Tested by

no test coverage detected