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:50
Definition: htcp.h:21
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:334
Definition: PeerSelectState.h:60
void selectAllParents()
Adds alive parents. Used as a last resort for never_direct.
Definition: peer_select.cc:866
PeerSelectionInitiator * interestedInitiator()
Definition: peer_select.cc:1142
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:915
void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override
Definition: peer_select.cc:541
void selectMore()
a single selection loop iteration: attempts to add more destinations
Definition: peer_select.cc:610
void startPingWaiting()
switches into the PING_WAITING state (and associated timeout monitoring)
Definition: peer_select.cc:262
void handleIcpParentMiss(CachePeer *, icp_common_t *)
Definition: peer_select.cc:927
void cancelPingTimeoutMonitoring()
terminates ICP ping timeout monitoring
Definition: peer_select.cc:271
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:1167
bool wantsMoreDestinations() const
Definition: peer_select.cc:1161
void checkNeverDirectDone(const Acl::Answer answer)
Definition: peer_select.cc:342
void checkAlwaysDirectDone(const Acl::Answer answer)
Definition: peer_select.cc:370
void handleHtcpReply(CachePeer *, const peer_t, HtcpReplyData *)
Definition: peer_select.cc:1003
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:970
static ACLCB CheckNeverDirectDone
Definition: PeerSelectState.h:133
void addSelection(CachePeer *, const hier_code)
Definition: peer_select.cc:1085
static ACLCB CheckAlwaysDirectDone
Definition: PeerSelectState.h:132
void noteLookup(const Dns::LookupDetails &details) override
Definition: peer_select.cc:501
void selectSomeDirect()
Adds a "direct" entry if the request can be forwarded to the origin server.
Definition: peer_select.cc:819
void noteIp(const Ip::Address &ip) override
Called when/if nbgethostbyname() discovers a new good IP address.
Definition: peer_select.cc:515
void resolveSelected()
A single DNS resolution loop iteration: Converts selected FwdServer to IPs.
Definition: peer_select.cc:412
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:706
void selectSomeNeighborReplies()
Selects a neighbor (parent or sibling) based on ICP/HTCP replies.
Definition: peer_select.cc:788
void handleHtcpParentMiss(CachePeer *, HtcpReplyData *)
Definition: peer_select.cc:1025
CBDATA_CHILD(PeerSelector)
Definition: Store.h:42
Definition: ICP.h:35