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

Function restEndpointsAssert

lib/Config.js:176–185  ·  view source on GitHub ↗
(restEndpoints, locationConstraints)

Source from the content-addressed store, hash-verified

174}
175
176function restEndpointsAssert(restEndpoints, locationConstraints) {
177 assert(typeof restEndpoints === 'object',
178 'bad config: restEndpoints must be an object of endpoints');
179 assert(Object.keys(restEndpoints).every(
180 r => typeof restEndpoints[r] === 'string'),
181 'bad config: each endpoint must be a string');
182 assert(Object.keys(restEndpoints).every(
183 r => typeof locationConstraints[restEndpoints[r]] === 'object'),
184 'bad config: rest endpoint target not in locationConstraints');
185}
186
187function gcpLocationConstraintAssert(location, locationObj) {
188 const {

Callers 3

_getConfigMethod · 0.85
setRestEndpointsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected