void processBacktraces(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BACKTRACES); writeScalarMessage(commonContext.fd, oxt::thread::all_backtraces()); }
void processDetachProcessByKey(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); commonContext.requireRights(Account::DETACH); // TODO: implement this writeArrayMessage(commonContext.fd, "false", NULL); }
void processToXml(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BASIC_INFO); bool includeSensitiveInfo = commonContext.account->hasRights(Account::INSPECT_SENSITIVE_INFO) && args[1] == "true"; writeScalarMessage(commonContext.fd, pool->toXml(includeSensitiveInfo)); }
void processRequests(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); stringstream stream; commonContext.requireRights(Account::INSPECT_REQUESTS); requestHandler->inspect(stream); writeScalarMessage(commonContext.fd, stream.str()); }
void processDetach(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); commonContext.requireRights(Account::DETACH); /* if (pool->detach(args[1])) { writeArrayMessage(commonContext.fd, "true", NULL); } else { */ writeArrayMessage(commonContext.fd, "false", NULL); //} }
bool processInspect(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BASIC_INFO); if ((args.size() - 1) % 2 != 0) { return false; } VariantMap map; vector<string>::const_iterator it = args.begin(), end = args.end(); it++; while (it != end) { const string &key = *it; it++; const string &value = *it; map.set(key, value); it++; } writeScalarMessage(commonContext.fd, pool->inspect(Pool::InspectOptions(map))); return true; }