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

Method processHttpCheckResult

src/checks/checker_process.cpp:1145–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143
1144
1145void CheckerProcess::processHttpCheckResult(
1146 const Stopwatch& stopwatch,
1147 const Future<int>& future)
1148{
1149 CHECK(!future.isPending());
1150
1151 Result<CheckStatusInfo> result = None();
1152
1153 if (future.isReady()) {
1154 LOG(INFO) << name << " for task '" << taskId << "'"
1155 << " returned: " << future.get();
1156
1157 CheckStatusInfo checkStatusInfo;
1158 checkStatusInfo.set_type(CheckInfo::HTTP);
1159 checkStatusInfo.mutable_http()->set_status_code(
1160 static_cast<uint32_t>(future.get()));
1161
1162 result = Result<CheckStatusInfo>(checkStatusInfo);
1163 } else if (future.isDiscarded()) {
1164 // Check's status is currently not available due to a transient error,
1165 // e.g., due to the agent failover, no `CheckStatusInfo` message should
1166 // be sent to the callback.
1167 result = None();
1168 } else {
1169 result = Result<CheckStatusInfo>(Error(future.failure()));
1170 }
1171
1172 processCheckResult(stopwatch, result);
1173}
1174
1175
1176#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