src/slave/http.cpp
// Returns a JSON object modeled after a Framework.
Returns a JSON object modeled after a Framework.
Returns a JSON object modeled after a Framework .
JSON::Object model(const Framework& framework)
{
  JSON::Object object;
  object.values["id"] = framework.id.value();
  object.values["name"] = framework.info.name();
  object.values["user"] = framework.info.user();
  JSON::Array array;
  foreachvalue (Executor* executor, framework.executors) {
    array.values.push_back(model(*executor));
  }
  object.values["executors"] = array;
  return object;
}
JSON :: Object model ( const Framework & framework ) { JSON :: Object object ; object . values [ " " ] = framework . id . value ( ) ; object . values [ " " ] = framework . info . name ( ) ; object . values [ " " ] = framework . info . user ( ) ; JSON :: Array array ; foreachvalue ( Executor * executor , framework . executors ) { array . values . push_back ( model ( * executor ) ) ; } object . values [ " " ] = array ; return object ; }
Returns a JSON object modeled after a Framework.
Returns a JSON object modeled after a Framework .
// Model all of the executors.