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

Function makeBackbeatRequest

tests/functional/backbeat/utils.js:71–84  ·  view source on GitHub ↗

makeBackbeatRequest - utility function to generate a request going * through backbeat route * @param {object} params - params for making request * @param {string} params.method - request method * @param {string} params.bucket - bucket name * @param {string} params.subCommand - subcommand to bac

(params, callback)

Source from the content-addressed store, hash-verified

69 * @return {undefined} - and call callback
70 */
71function makeBackbeatRequest(params, callback) {
72 const { method, headers, bucket, authCredentials, queryObj } = params;
73 const options = {
74 hostname: ipAddress,
75 port: 8000,
76 method,
77 headers,
78 authCredentials,
79 path: `/_/backbeat/lifecycle/${bucket}`,
80 jsonResponse: true,
81 queryObj,
82 };
83 makeRequest(options, callback);
84}
85
86module.exports = {
87 makeBackbeatRequest,

Calls 1

makeRequestFunction · 0.50

Tested by

no test coverage detected