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

Function serialize

src/common/http.cpp:107–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105namespace internal {
106
107string serialize(
108 ContentType contentType,
109 const google::protobuf::Message& message)
110{
111 switch (contentType) {
112 case ContentType::PROTOBUF: {
113 return message.SerializeAsString();
114 }
115 case ContentType::JSON: {
116 return jsonify(JSON::Protobuf(message));
117 }
118 case ContentType::RECORDIO: {
119 LOG(FATAL) << "Serializing a RecordIO stream is not supported";
120 }
121 }
122
123 UNREACHABLE();
124}
125
126
127bool streamingMediaType(ContentType contentType)

Callers 15

sendMethod · 0.70
sendMethod · 0.50
callMethod · 0.50
cleanupContainersMethod · 0.50
foreachFunction · 0.50
sendMethod · 0.50
nestedCommandCheckMethod · 0.50
__nestedCommandCheckMethod · 0.50
waitNestedContainerMethod · 0.50
postMethod · 0.50
sendMethod · 0.50
postMethod · 0.50

Calls 2

jsonifyFunction · 0.85
ProtobufClass · 0.85

Tested by 15

postMethod · 0.40
TEST_PFunction · 0.40
postMethod · 0.40
TEST_PFunction · 0.40
postMethod · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_PFunction · 0.40