@@ -56,30 +56,33 @@ function _canUserReplicate(authInfo) {
5656 * decides the `content` array based on the operation kind, and
5757 * stitches the result into a `replicationInfo` envelope.
5858 *
59- * @param {object } s3config - Cloudserver configuration object
60- * @param {object } s3config.locationConstraints - Configured map of location constraints
61- * @param {object[] } s3config.replicationEndpoints - Configured replication endpoints
62- * @param {string } objKey - The key of the object
63- * @param {object } bucketMD - The bucket metadata
64- * @param {boolean } isMD - Whether the operation is only updating metadata
65- * @param {boolean } objSize - The size, in bytes, of the object being PUT
66- * @param {string } operationType - The type of operation to replicate
67- * @param {object } objectMD - The object metadata
68- * @param {AuthInfo } [authInfo] - authentication info of object owner
69- * @param {string[] } [blockedSiteTypes=[]] - location types to exclude from the returned backends
59+ * @param {object } params - Named parameters
60+ * @param {object } params.s3config - Cloudserver configuration object
61+ * @param {object } params.s3config.locationConstraints - Configured map of location constraints
62+ * @param {object[] } params.s3config.replicationEndpoints - Configured replication endpoints
63+ * @param {string } params.objKey - The key of the object
64+ * @param {object } params.bucketMD - The bucket metadata
65+ * @param {boolean } params.isMD - Whether the operation is only updating metadata
66+ * @param {number } params.objSize - The size, in bytes, of the object being PUT
67+ * @param {string } [params.operationType] - The type of operation to replicate
68+ * @param {object } [params.objectMD] - The object metadata
69+ * @param {AuthInfo } [params.authInfo] - authentication info of object owner
70+ * @param {string[] } [params.blockedSiteTypes=[]] - location types to exclude from the returned backends
7071 * @return {object|undefined }
7172 */
72- function getReplicationInfo (
73- s3config ,
74- objKey ,
75- bucketMD ,
76- isMD ,
77- objSize ,
78- operationType ,
79- objectMD ,
80- authInfo ,
81- blockedSiteTypes = [ ] ,
82- ) {
73+ function getReplicationInfo ( params ) {
74+ const {
75+ s3config,
76+ objKey,
77+ bucketMD,
78+ isMD,
79+ objSize,
80+ operationType,
81+ objectMD,
82+ authInfo,
83+ blockedSiteTypes = [ ] ,
84+ } = params ;
85+
8386 const config = bucketMD . getReplicationConfiguration ( ) ;
8487 if ( ! config || ! _canUserReplicate ( authInfo ) ) {
8588 return undefined ;
0 commit comments