【发布时间】:2020-04-28 20:48:13
【问题描述】:
我的 .proto 中有这两个定义:
// all the shards on a server
message ConfigEntry {
repeated Shard shards = 2;
string server = 3;
}
// information on all the groups
message QueryResponse {
repeated ConfigEntry config = 1;
}
在我的 c++ 文件中,我尝试在 QueryResponse 中设置这张地图:
std::map<std::string, std::vector<shard_t>> servers;
我找不到任何方法将我的地图中的值设置为在 QueryResponse 中进行配置,有什么想法吗?
【问题讨论】:
标签: c++ protocol-buffers grpc proto protobuf-c