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

Method getFlags

src/slave/http.cpp:978–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976
977
978Future<Response> Http::getFlags(
979 const mesos::agent::Call& call,
980 ContentType acceptType,
981 const Option<Principal>& principal) const
982{
983 CHECK_EQ(mesos::agent::Call::GET_FLAGS, call.type());
984
985 LOG(INFO) << "Processing GET_FLAGS call";
986
987 return ObjectApprovers::create(slave->authorizer, principal, {VIEW_FLAGS})
988 .then(defer(
989 slave->self(),
990 [this, acceptType](
991 const Owned<ObjectApprovers>& approvers) -> Response {
992 if (!approvers->approved<VIEW_FLAGS>()) {
993 return Forbidden();
994 }
995
996 return OK(
997 serialize(
998 acceptType, evolve<v1::agent::Response::GET_FLAGS>(_flags())),
999 stringify(acceptType));
1000 }));
1001}
1002
1003
1004string Http::HEALTH_HELP()

Callers

nothing calls this directly

Calls 9

deferFunction · 0.85
ForbiddenClass · 0.85
OKClass · 0.85
typeMethod · 0.80
createFunction · 0.50
serializeFunction · 0.50
stringifyFunction · 0.50
thenMethod · 0.45
selfMethod · 0.45

Tested by

no test coverage detected