PeerSelectState.h
Go to the documentation of this file.
52 void startSelectingDestinations(HttpRequest *request, const AccessLogEntry::Pointer &ale, StoreEntry *entry);
138 int direct; // TODO: fold always_direct/never_direct/prefer_direct into this now that ACL can do a multi-state result.
void error(char *format,...)
Definition: Checklist.h:27
Definition: Acl.h:128
Definition: CachePeer.h:31
Definition: cbdata.h:276
Definition: ipcache.h:51
an interface for receiving IP::Addresses from nbgethostbyname()
Definition: ipcache.h:195
Definition: errorpage.h:89
Definition: peer_select.cc:51
Definition: htcp.h:22
Definition: HttpRequest.h:49
Definition: Address.h:41
Interface for those who need a list of peers to forward a request to.
Definition: PeerSelectState.h:33
bool subscribed
whether noteDestination() and noteDestinationsEnd() calls are allowed
Definition: PeerSelectState.h:46
virtual void noteDestination(Comm::ConnectionPointer path)=0
called when a new unique destination has been found
~PeerSelectionInitiator() override=default
virtual void noteDestinationsEnd(ErrorState *error)=0
void startSelectingDestinations(HttpRequest *request, const AccessLogEntry::Pointer &ale, StoreEntry *entry)
Definition: peer_select.cc:335
Definition: PeerSelectState.h:60
void selectAllParents()
Adds alive parents. Used as a last resort for never_direct.
Definition: peer_select.cc:867
PeerSelectionInitiator * interestedInitiator()
Definition: peer_select.cc:1143
Initiator initiator_
recipient of the destinations we select; use interestedInitiator() to access
Definition: PeerSelectState.h:164
static void HandlePingTimeout(PeerSelector *)
called when the given selector should stop expecting ICP ping responses
Definition: peer_select.cc:916
void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override
Definition: peer_select.cc:542
void selectMore()
a single selection loop iteration: attempts to add more destinations
Definition: peer_select.cc:611
void startPingWaiting()
switches into the PING_WAITING state (and associated timeout monitoring)
Definition: peer_select.cc:263
void handleIcpParentMiss(CachePeer *, icp_common_t *)
Definition: peer_select.cc:928
void cancelPingTimeoutMonitoring()
terminates ICP ping timeout monitoring
Definition: peer_select.cc:272
CbcPointer< PeerSelectionInitiator > Initiator
Definition: PeerSelectState.h:163
void handlePath(const Comm::ConnectionPointer &path, FwdServer &fs)
processes a newly discovered/finalized path
Definition: peer_select.cc:1168
bool wantsMoreDestinations() const
Definition: peer_select.cc:1162
void checkNeverDirectDone(const Acl::Answer answer)
Definition: peer_select.cc:343
void checkAlwaysDirectDone(const Acl::Answer answer)
Definition: peer_select.cc:371
void handleHtcpReply(CachePeer *, const peer_t, HtcpReplyData *)
Definition: peer_select.cc:1004
void * peerCountMcastPeerXXX
a hack to help peerCountMcastPeersStart()
Definition: PeerSelectState.h:101
void handleIcpReply(CachePeer *, const peer_t, icp_common_t *header)
Definition: peer_select.cc:971
static ACLCB CheckNeverDirectDone
Definition: PeerSelectState.h:133
void addSelection(CachePeer *, const hier_code)
Definition: peer_select.cc:1086
static ACLCB CheckAlwaysDirectDone
Definition: PeerSelectState.h:132
void noteLookup(const Dns::LookupDetails &details) override
Definition: peer_select.cc:502
void selectSomeDirect()
Adds a "direct" entry if the request can be forwarded to the origin server.
Definition: peer_select.cc:820
void noteIp(const Ip::Address &ip) override
Called when/if nbgethostbyname() discovers a new good IP address.
Definition: peer_select.cc:516
void resolveSelected()
A single DNS resolution loop iteration: Converts selected FwdServer to IPs.
Definition: peer_select.cc:413
const InstanceId< PeerSelector > id
unique identification in worker log
Definition: PeerSelectState.h:166
void selectPinned()
Selects a pinned connection if it exists, is valid, and is allowed.
Definition: peer_select.cc:707
void selectSomeNeighborReplies()
Selects a neighbor (parent or sibling) based on ICP/HTCP replies.
Definition: peer_select.cc:789
void handleHtcpParentMiss(CachePeer *, HtcpReplyData *)
Definition: peer_select.cc:1026
CBDATA_CHILD(PeerSelector)
Definition: Store.h:42
Definition: ICP.h:35