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

Method create

src/uri/fetchers/docker.cpp:631–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629
630
631Try<Owned<Fetcher::Plugin>> DockerFetcherPlugin::create(
632 const Flags& flags,
633 bool enableAuthServiceUriFallback)
634{
635 // TODO(jieyu): Make sure curl is available.
636
637 hashmap<string, spec::Config::Auth> auths;
638 if (flags.docker_config.isSome()) {
639 Try<hashmap<string, spec::Config::Auth>> cachedAuths =
640 spec::parseAuthConfig(flags.docker_config.get());
641
642 if (cachedAuths.isError()) {
643 return Error("Failed to parse docker config: " + cachedAuths.error());
644 }
645
646 auths = cachedAuths.get();
647 }
648
649 Owned<DockerFetcherPluginProcess> process(new DockerFetcherPluginProcess(
650 hashmap<string, spec::Config::Auth>(auths),
651 flags.docker_stall_timeout,
652 enableAuthServiceUriFallback));
653
654 return Owned<Fetcher::Plugin>(new DockerFetcherPlugin(process));
655}
656
657
658string DockerFetcherPlugin::getBlobPath(

Callers

nothing calls this directly

Calls 6

parseAuthConfigFunction · 0.85
errorMethod · 0.65
ErrorFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected