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

Method processTcpCheckResult

src/checks/checker_process.cpp:1340–1367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1338
1339
1340void CheckerProcess::processTcpCheckResult(
1341 const Stopwatch& stopwatch,
1342 const Future<bool>& future)
1343{
1344 CHECK(!future.isPending());
1345
1346 Result<CheckStatusInfo> result = None();
1347
1348 if (future.isReady()) {
1349 LOG(INFO) << name << " for task '" << taskId << "'"
1350 << " returned: " << future.get();
1351
1352 CheckStatusInfo checkStatusInfo;
1353 checkStatusInfo.set_type(CheckInfo::TCP);
1354 checkStatusInfo.mutable_tcp()->set_succeeded(future.get());
1355
1356 result = Result<CheckStatusInfo>(checkStatusInfo);
1357 } else if (future.isDiscarded()) {
1358 // Check's status is currently not available due to a transient error,
1359 // e.g., due to the agent failover, no `CheckStatusInfo` message should
1360 // be sent to the callback.
1361 result = None();
1362 } else {
1363 result = Result<CheckStatusInfo>(Error(future.failure()));
1364 }
1365
1366 processCheckResult(stopwatch, result);
1367}
1368
1369
1370#ifdef __WINDOWS__

Callers

nothing calls this directly

Calls 7

NoneClass · 0.85
isReadyMethod · 0.80
isDiscardedMethod · 0.80
failureMethod · 0.80
ErrorFunction · 0.50
isPendingMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected