#include "squid.h"
#include "acl/FilledChecklist.h"
#include "base/AsyncCbdataCalls.h"
#include "base/InstanceId.h"
#include "base/TypeTraits.h"
#include "CachePeer.h"
#include "CachePeers.h"
#include "carp.h"
#include "client_side.h"
#include "dns/LookupDetails.h"
#include "errorpage.h"
#include "event.h"
#include "FwdState.h"
#include "globals.h"
#include "hier_code.h"
#include "htcp.h"
#include "http/Stream.h"
#include "HttpRequest.h"
#include "icmp/net_db.h"
#include "ICP.h"
#include "ip/tools.h"
#include "ipcache.h"
#include "neighbors.h"
#include "peer_sourcehash.h"
#include "peer_userhash.h"
#include "PeerSelectState.h"
#include "SquidConfig.h"
#include "Store.h"
#include "time/gadgets.h"
Go to the source code of this file.
Classes | |
class | FwdServer |
class | PeerSelectionDumper |
a helper class to report a selected destination (for debugging) More... | |
class | PeerSelectorPingMonitor |
Functions | |
static std::ostream & | operator<< (std::ostream &os, const PeerSelectionDumper &fsd) |
prints PeerSelectionDumper (for debugging) More... | |
static PeerSelectorPingMonitor & | PingMonitor () |
monitors all PeerSelector ICP ping timeouts More... | |
static int | peerSelectIcpPing (PeerSelector *ps, int direct, StoreEntry *entry) |
static void | peerSelect (PeerSelectionInitiator *initiator, HttpRequest *request, AccessLogEntry::Pointer const &al, StoreEntry *entry) |
bool | peerAllowedToUse (const CachePeer *, PeerSelector *) |
void | peerSelectInit (void) |
InstanceIdDefinitions (PeerSelector, "PeerSelector") | |
Variables | |
struct { | |
int timeouts | |
} | PeerStats |
static const char * | DirectStr [] |
Function Documentation
◆ InstanceIdDefinitions()
InstanceIdDefinitions | ( | PeerSelector | , |
"PeerSelector" | |||
) |
◆ operator<<()
|
static |
Definition at line 92 of file peer_select.cc.
References PeerSelectionDumper::code, hier_code_str, AnyP::Uri::host(), PeerSelectionDumper::peer, PeerSelector::request, PeerSelectionDumper::selector, and HttpRequest::url.
◆ peerAllowedToUse()
bool peerAllowedToUse | ( | const CachePeer * | p, |
PeerSelector * | ps | ||
) |
- Returns
- Whether it is appropriate to fetch REQUEST from PEER.
Definition at line 137 of file neighbors.cc.
References CachePeer::access, ACLFilledChecklist::al, PeerSelector::al, Acl::Answer::allowed(), assert, AnyP::Uri::authority(), debugs, ACLChecklist::fastCheck(), HttpRequest::flags, RefCount< C >::getRaw(), CachePeer::http_port, HTTPMSGLOCK(), RequestFlags::loopDetected, CachePeer::mcast_siblings, HttpRequest::method, Http::METHOD_CONNECT, RequestFlags::needValidation, neighborType(), RequestFlags::noCache, CachePeer::options, CachePeer::originserver, PEER_MULTICAST, PEER_SIBLING, AnyP::Uri::port(), RequestFlags::refresh, AccessLogEntry::reply, ACLFilledChecklist::reply, PeerSelector::request, ACLFilledChecklist::syncAle(), CachePeer::type, and HttpRequest::url.
Referenced by peerHTTPOkay(), peerWouldBePinged(), and PeerSelector::selectPinned().
◆ peerSelect()
|
static |
Definition at line 304 of file peer_select.cc.
References current_time, debugs, HttpRequest::hier, HTTPMSGLOCK(), HttpRequest::method, HierarchyLogEntry::peer_select_start, and StoreEntry::url().
Referenced by PeerSelectionInitiator::startSelectingDestinations().
◆ peerSelectIcpPing()
|
static |
Definition at line 278 of file peer_select.cc.
References assert, debugs, DIRECT_NO, DIRECT_YES, EBIT_TEST, HttpRequest::flags, StoreEntry::flags, RequestFlags::hierarchical, KEY_PRIVATE, neighbors_do_private_keys, neighborsCount(), PING_NONE, StoreEntry::ping_status, PeerSelector::request, and StoreEntry::url().
Referenced by PeerSelector::selectSomeNeighbor().
◆ peerSelectInit()
void peerSelectInit | ( | void | ) |
Definition at line 922 of file peer_select.cc.
References PeerStats.
Referenced by serverConnectionsOpen().
◆ PingMonitor()
|
static |
Definition at line 132 of file peer_select.cc.
References Instance().
Referenced by PeerSelector::cancelPingTimeoutMonitoring(), and PeerSelector::startPingWaiting().
Variable Documentation
◆ DirectStr
|
static |
Definition at line 70 of file peer_select.cc.
Referenced by PeerSelector::checkAlwaysDirectDone(), PeerSelector::checkNeverDirectDone(), and PeerSelector::selectMore().
◆
struct { ... } PeerStats |
Referenced by PeerSelector::handlePingTimeout(), and peerSelectInit().
◆ timeouts
int timeouts |
Definition at line 67 of file peer_select.cc.