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

Method foreach

src/sched/sched.cpp:590–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588 vector<string> pids;
589
590 foreach (const Offer& offer, offers) {
591 CHECK(offer.has_url())
592 << "Offer.url required for Event support";
593 CHECK(offer.url().has_path())
594 << "Offer.url.path required for Event support";
595
596 string id = offer.url().path();
597 id = strings::trim(id, "/");
598
599 Try<net::IP> ip =
600 net::IP::parse(offer.url().address().ip(), AF_INET);
601
602 CHECK_SOME(ip) << "Failed to parse Offer.url.address.ip";
603
604 pids.push_back(UPID(id, ip.get(), offer.url().address().port()));
605 }
606
607 resourceOffers(from, offers, pids);
608

Callers

nothing calls this directly

Calls 14

trimFunction · 0.85
createStatusUpdateFunction · 0.85
NoneClass · 0.85
CopyFromMethod · 0.80
typeMethod · 0.80
parseFunction · 0.50
UPIDClass · 0.50
urlMethod · 0.45
pathMethod · 0.45
addressMethod · 0.45
getMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected