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

Method slaves

src/master/http.cpp:2015–2035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2013
2014
2015Future<Response> Master::Http::slaves(
2016 const Request& request,
2017 const Option<Principal>& principal) const
2018{
2019 // When current master is not the leader, redirect to the leading master.
2020 if (!master->elected()) {
2021 return redirect(request);
2022 }
2023
2024 return ObjectApprovers::create(master->authorizer, principal, {VIEW_ROLE})
2025 .then(defer(
2026 master->self(),
2027 [this, request, principal](const Owned<ObjectApprovers>& approvers) {
2028 return deferBatchedRequest(
2029 &Master::ReadOnlyHandler::slaves,
2030 principal,
2031 ContentType::JSON,
2032 request.url.query,
2033 approvers);
2034 }));
2035}
2036
2037
2038Future<Response> Master::Http::getAgents(

Callers 14

FetchAndStoreAndFetchFunction · 0.45
NamesFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
foreachpairFunction · 0.45
performMethod · 0.45
initializeMethod · 0.45

Calls 6

redirectFunction · 0.85
deferFunction · 0.85
electedMethod · 0.80
createFunction · 0.50
thenMethod · 0.45
selfMethod · 0.45

Tested by 10

FetchAndStoreAndFetchFunction · 0.36
NamesFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
foreachpairFunction · 0.36