MCPcopy Create free account
hub / github.com/apache/mesos / _urlFetchBlob

Method _urlFetchBlob

src/uri/fetchers/docker.cpp:1106–1133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104
1105
1106Future<Nothing> DockerFetcherPluginProcess::_urlFetchBlob(
1107 const string& directory,
1108 const URI& blobUri,
1109 const http::Headers& authHeaders,
1110 vector<string> urls)
1111{
1112 if (urls.empty()) {
1113 return Failure("Failed to fetch with foreign urls");
1114 }
1115
1116 string url = urls.back();
1117 urls.pop_back();
1118 return download(blobUri, url, directory, authHeaders, stallTimeout)
1119 .then(defer(self(), [=](int code) -> Future<Nothing> {
1120 if (code == http::Status::OK) {
1121 return Nothing();
1122 }
1123
1124 LOG(WARNING) << "Unexpected HTTP response '"
1125 << http::Status::string(code)
1126 << "' when trying to download blob '"
1127 << strings::trim(stringify(blobUri))
1128 << "' from '" << url
1129 << "' in schema 2 manifest";
1130
1131 return _urlFetchBlob(directory, blobUri, authHeaders, urls);
1132 }));
1133}
1134#endif
1135
1136// Tries to obtain URI of the V2 authorization service based on the

Callers

nothing calls this directly

Calls 8

FailureClass · 0.85
deferFunction · 0.85
NothingClass · 0.85
trimFunction · 0.85
downloadFunction · 0.70
stringifyFunction · 0.50
emptyMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected