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

Method CheckerProcess

src/checks/checker_process.cpp:239–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237
238
239CheckerProcess::CheckerProcess(
240 const CheckInfo& checkInfo,
241 const string& launcherDir,
242 const lambda::function<void(const Try<CheckStatusInfo>&)>& _callback,
243 const TaskID& _taskId,
244 const string& _name,
245 Variant<runtime::Plain, runtime::Docker, runtime::Nested> _runtime,
246 const Option<string>& scheme,
247 bool ipv6)
248 : ProcessBase(process::ID::generate("checker")),
249 updateCallback(_callback),
250 taskId(_taskId),
251 name(_name),
252 runtime(std::move(_runtime)),
253 check(checkInfoToCheck(checkInfo, launcherDir, scheme, ipv6)),
254 paused(false)
255{
256 Try<Duration> create = Duration::create(checkInfo.delay_seconds());
257 CHECK_SOME(create);
258 checkDelay = create.get();
259
260 create = Duration::create(checkInfo.interval_seconds());
261 CHECK_SOME(create);
262 checkInterval = create.get();
263
264 // Zero value means infinite timeout.
265 create = Duration::create(checkInfo.timeout_seconds());
266 CHECK_SOME(create);
267 checkTimeout =
268 (create.get() > Duration::zero()) ? create.get() : Duration::max();
269}
270
271
272void CheckerProcess::initialize()

Callers

nothing calls this directly

Calls 5

generateFunction · 0.85
checkInfoToCheckFunction · 0.85
maxFunction · 0.85
createFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected