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

Method _fetch

src/uri/fetchers/docker.cpp:807–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805
806
807Future<Nothing> DockerFetcherPluginProcess::_fetch(
808 const URI& uri,
809 const string& directory,
810 const URI& manifestUri,
811 const http::Headers& manifestHeaders,
812 const http::Headers& basicAuthHeaders,
813 const http::Response& response)
814{
815 if (response.code == http::Status::UNAUTHORIZED) {
816 // Use the 'Basic' credential to request an auth token by default.
817 return getAuthHeader(uri.path(), manifestUri, basicAuthHeaders, response)
818 .then(defer(self(), [=](
819 const http::Headers& authHeaders) -> Future<Nothing> {
820 return curl(manifestUri, manifestHeaders + authHeaders, stallTimeout)
821 .then(defer(self(),
822 &Self::__fetch,
823 uri,
824 directory,
825 authHeaders,
826 lambda::_1));
827 }));
828 }
829
830 return __fetch(uri, directory, basicAuthHeaders, response);
831}
832
833
834Future<Nothing> DockerFetcherPluginProcess::__fetch(

Callers

nothing calls this directly

Calls 5

getAuthHeaderFunction · 0.85
deferFunction · 0.85
curlFunction · 0.85
thenMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected