MCPcopy Index your code
hub / github.com/scality/cloudserver / _getStorageClasses

Function _getStorageClasses

lib/api/apiUtils/object/getReplicationInfo.js:19–31  ·  view source on GitHub ↗
(s3config, rule)

Source from the content-addressed store, hash-verified

17}
18
19function _getStorageClasses(s3config, rule) {
20 if (rule.storageClass) {
21 return rule.storageClass.split(',');
22 }
23 const { replicationEndpoints } = s3config;
24 // If no storage class, use the given default endpoint or the sole endpoint
25 if (replicationEndpoints.length > 0) {
26 const endPoint =
27 replicationEndpoints.find(endpoint => endpoint.default) || replicationEndpoints[0];
28 return [endPoint.site];
29 }
30 return undefined;
31}
32
33function _getReplicationInfo(s3config, rule, replicationConfig, content, operationType,
34 objectMD, bucketMD) {

Callers 1

_getReplicationInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected