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

Method getApiVersion

src/csi/service_manager.cpp:429–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427
428
429Future<string> ServiceManagerProcess::getApiVersion()
430{
431 if (apiVersion.isSome()) {
432 return apiVersion.get();
433 }
434
435 // Ensure that the unmanaged CSI plugin has been probed (which does the API
436 // version detection) before returning the API version.
437 if (!serviceEndpoints.empty()) {
438 return probeEndpoint(serviceEndpoints.begin()->second)
439 .then(process::defer(self(), [=] { return CHECK_NOTNONE(apiVersion); }));
440 }
441
442 // For the managed CSI plugin, `probeEndpoint` will be internally called by
443 // `getEndpoint` to do the API version detection.
444 CHECK(!serviceContainers.empty());
445 return getEndpoint(serviceContainers.begin()->second)
446 .then(process::defer(self(), [=] { return CHECK_NOTNONE(apiVersion); }));
447}
448
449
450Option<CSIPluginContainerInfo> ServiceManagerProcess::getContainerInfo(

Callers 2

recoverMethod · 0.80
foreachpairFunction · 0.80

Calls 6

deferFunction · 0.85
isSomeMethod · 0.45
getMethod · 0.45
emptyMethod · 0.45
thenMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected