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

Function hdClientLocationConstraintAssert

lib/Config.js:294–306  ·  view source on GitHub ↗
(configHd)

Source from the content-addressed store, hash-verified

292}
293
294function hdClientLocationConstraintAssert(configHd) {
295 const hdclientFields = [];
296 if (configHd.bootstrap !== undefined) {
297 assert(Array.isArray(configHd.bootstrap)
298 && configHd.bootstrap
299 .every(e => typeof e === 'string'),
300 'bad config: hdclient.bootstrap must be an array of strings');
301 assert(configHd.bootstrap.length > 0,
302 'bad config: hdclient bootstrap list is empty');
303 hdclientFields.push('bootstrap');
304 }
305 return hdclientFields;
306}
307
308function locationConstraintAssert(locationConstraints) {
309 const supportedBackends = [

Callers 1

locationConstraintAssertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected