MCPcopy Create free account
hub / github.com/apache/mesos / getServiceEndpoint

Method getServiceEndpoint

src/csi/service_manager.cpp:402–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400
401
402Future<string> ServiceManagerProcess::getServiceEndpoint(const Service& service)
403{
404 // For the unmanaged CSI plugin, get its endpoint from
405 // `serviceEndpoints` directly.
406 if (!serviceEndpoints.empty()) {
407 if (serviceEndpoints.contains(service)) {
408 return serviceEndpoints.at(service);
409 } else {
410 return Failure(
411 stringify(service) + " not found for CSI plugin type '" +
412 info.type() + "' and name '" + info.name() + "'");
413 }
414 }
415
416 // For the managed CSI plugin, get its endpoint via its corresponding
417 // standalone container ID.
418 CHECK(!serviceContainers.empty());
419 if (!serviceContainers.contains(service)) {
420 return Failure(
421 stringify(service) + " not found for CSI plugin type '" + info.type() +
422 "' and name '" + info.name() + "'");
423 }
424
425 return getEndpoint(serviceContainers.at(service));
426}
427
428
429Future<string> ServiceManagerProcess::getApiVersion()

Callers 2

callMethod · 0.80
callMethod · 0.80

Calls 10

FailureClass · 0.85
deferFunction · 0.85
atMethod · 0.80
typeMethod · 0.80
stringifyFunction · 0.50
emptyMethod · 0.45
containsMethod · 0.45
nameMethod · 0.45
thenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected