MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHostStatusGet

Function TSHostStatusGet

src/api/InkAPI.cc:8845–8859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8843}
8844
8845TSReturnCode
8846TSHostStatusGet(const char *hostname, const size_t hostname_len, TSHostStatus *status, unsigned int *reason)
8847{
8848 HostStatRec *hst = HostStatus::instance().getHostStatus(std::string_view(hostname, hostname_len));
8849 if (hst == nullptr) {
8850 return TS_ERROR;
8851 }
8852 if (status != nullptr) {
8853 *status = hst->status;
8854 }
8855 if (reason != nullptr) {
8856 *reason = hst->reasons;
8857 }
8858 return TS_SUCCESS;
8859}
8860
8861void
8862TSHostStatusSet(const char *hostname, const size_t hostname_len, TSHostStatus status, const unsigned int down_time,

Callers

nothing calls this directly

Calls 1

getHostStatusMethod · 0.45

Tested by

no test coverage detected