MCPcopy Create free account
hub / github.com/apple/foundationdb / constructResourcePath

Function constructResourcePath

fdbclient/S3BlobStore.actor.cpp:403–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403std::string constructResourcePath(Reference<S3BlobStoreEndpoint> b,
404 const std::string& bucket,
405 const std::string& object) {
406 std::string resource;
407
408 if (b->getHost().find(bucket + ".") != 0) {
409 resource += std::string("/") + bucket; // not virtual hosting mode
410 }
411
412 if (!object.empty()) {
413 resource += "/";
414 resource += object;
415 }
416
417 return resource;
418}
419
420ACTOR Future<bool> bucketExists_impl(Reference<S3BlobStoreEndpoint> b, std::string bucket) {
421 wait(b->requestRateRead->getAllowance(1));

Calls 3

getHostMethod · 0.80
findMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected