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

Method getAllHostStatuses

src/proxy/HostStatus.cc:300–319  ·  view source on GitHub ↗

retrieve all host statuses.

Source from the content-addressed store, hash-verified

298
299// retrieve all host statuses.
300void
301HostStatus::getAllHostStatuses(std::vector<HostStatuses> &hosts)
302{
303 if (hosts_statuses.empty()) {
304 return;
305 }
306
307 ink_rwlock_rdlock(&host_status_rwlock);
308 {
309 for (std::pair<std::string, HostStatRec *> hsts : hosts_statuses) {
310 std::stringstream ss;
311 HostStatuses h;
312 h.hostname = hsts.first;
313 ss << *hsts.second;
314 h.status = ss.str();
315 hosts.push_back(h);
316 }
317 }
318 ink_rwlock_unlock(&host_status_rwlock);
319}
320
321// retrieve the named host status.
322HostStatRec *

Callers 2

server_get_statusFunction · 0.80
sync_taskMethod · 0.80

Calls 5

ink_rwlock_rdlockFunction · 0.85
ink_rwlock_unlockFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected