MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cpp-samples / parse_message

Function parse_message

populate-bucket/populate_bucket.cc:162–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160};
161
162work_item parse_message(pubsub::Message const& m) {
163 auto attributes = m.attributes();
164 return work_item{
165 attributes.at("bucket"),
166 attributes.at("prefix"),
167 std::stoll(attributes.at("object_count")),
168 attributes.at("use_hash_prefix") == "true",
169 };
170}
171
172pubsub::Message format_work_item(work_item wi) {
173 return pubsub::MessageBuilder()

Callers 1

process_one_itemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected