MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / create_req

Function create_req

tools/cpp_examples/demo-client/src/echo_kvdb.cpp:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30using baidu::paddle_serving::predictor::format::KVDBRes;
31int global_key = 0;
32int create_req(Request& req) { // NOLINT
33 KVDBReq* key = req.mutable_reqs()->Add();
34 key->set_op("SET");
35 key->set_key(std::to_string(global_key));
36 key->set_value(std::to_string(global_key * 1));
37
38 key = req.mutable_reqs()->Add();
39 key->set_op("GET");
40 key->set_key(std::to_string(global_key));
41 global_key++;
42 return 0;
43}
44
45void print_res(const Request& req,
46 const Response& res,

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected