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

Function getRegistryPort

src/docker/spec.cpp:103–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103Result<int> getRegistryPort(const string& registry)
104{
105 if (registry.empty()) {
106 return None();
107 }
108
109 Option<int> port;
110
111 vector<string> split = strings::split(registry, ":", 2);
112 if (split.size() != 1) {
113 Try<int> numified = numify<int>(split[1]);
114 if (numified.isError()) {
115 return Error("Failed to numify '" + split[1] + "'");
116 }
117
118 port = numified.get();
119 }
120
121 return port;
122}
123
124
125Try<string> getRegistryScheme(const string& registry)

Callers 4

TEST_FFunction · 0.85
_pullMethod · 0.85
foreachFunction · 0.85
getRegistrySchemeFunction · 0.85

Calls 7

NoneClass · 0.85
splitFunction · 0.85
ErrorFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected