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

Method Push

getting-started/gke/index_gcs.cc:160–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 : client_(std::move(client)) {}
159
160future<Status> MutationBatcher::Push(gcs::ObjectMetadata const& o) {
161 std::unique_lock lk(mu_);
162 // Make room for the new data.
163 FlushIfNeeded(lk);
164 items_.push_back(Item{UpdateObjectMetadata(o), promise<Status>{}});
165 return items_.back().done.get_future();
166}
167
168std::int64_t MutationBatcher::Flush() {
169 std::unique_lock lk(mu_);

Callers 1

IndexGcsPrefixFunction · 0.80

Calls 1

UpdateObjectMetadataFunction · 0.50

Tested by

no test coverage detected