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

Function extractServices

src/slave/csi_server.cpp:455–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453
454
455hashset<CSIPluginContainerInfo::Service> extractServices(
456 const CSIPluginInfo& plugin)
457{
458 hashset<CSIPluginContainerInfo::Service> result;
459
460 if (plugin.containers_size() > 0) {
461 foreach (const CSIPluginContainerInfo& container, plugin.containers()) {
462 for (int i = 0; i < container.services_size(); ++i) {
463 result.insert(container.services(i));
464 }
465 }
466 } else {
467 CHECK(plugin.endpoints_size() > 0);
468
469 foreach (const CSIPluginEndpoint& endpoint, plugin.endpoints()) {
470 result.insert(endpoint.csi_service());
471 }
472 }
473
474 return result;
475}
476
477
478CSIServer::CSIServer(

Callers 1

foreachpairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected