#include "squid.h"
#include "CachePeer.h"
#include "CachePeers.h"
#include "carp.h"
#include "HttpRequest.h"
#include "mgr/Registration.h"
#include "neighbors.h"
#include "PeerSelectState.h"
#include "SquidConfig.h"
#include "Store.h"
#include <cmath>
Go to the source code of this file.
Macros | |
#define | ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) |
Functions | |
static auto & | CarpPeers () |
CARP cache_peers ordered by their CARP weight. More... | |
static int | peerSortWeight (const void *a, const void *b) |
static void | carpRegisterWithCacheManager (void) |
void | carpInit (void) |
CachePeer * | carpSelectParent (PeerSelector *ps) |
static void | carpCachemgr (StoreEntry *sentry) |
Variables | |
static OBJH | carpCachemgr |
Macro Definition Documentation
◆ ROTATE_LEFT
#define ROTATE_LEFT | ( | x, | |
n | |||
) | (((x) << (n)) | ((x) >> (32-(n)))) |
Function Documentation
◆ carpCachemgr()
|
static |
Definition at line 215 of file carp.cc.
References CarpPeers(), and storeAppendPrintf().
◆ carpInit()
void carpInit | ( | void | ) |
Definition at line 51 of file carp.cc.
References assert, CarpPeers(), carpRegisterWithCacheManager(), CurrentCachePeers(), double, int, PEER_PARENT, peerSortWeight(), and ROTATE_LEFT.
Referenced by serverConnectionsOpen().
◆ CarpPeers()
|
static |
Definition at line 28 of file carp.cc.
Referenced by carpCachemgr(), carpInit(), and carpSelectParent().
◆ carpRegisterWithCacheManager()
|
static |
Definition at line 45 of file carp.cc.
References carpCachemgr, and Mgr::RegisterAction().
Referenced by carpInit().
◆ carpSelectParent()
CachePeer * carpSelectParent | ( | PeerSelector * | ps | ) |
Definition at line 138 of file carp.cc.
References SBuf::append(), SBuf::appendf(), assert, CarpPeers(), debugs, HttpRequest::effectiveRequestUri(), AnyP::Uri::getScheme(), AnyP::Uri::host(), AnyP::UriScheme::image(), SBuf::isEmpty(), SBuf::length(), SBuf::npos, AnyP::Uri::path(), peerHTTPOkay(), AnyP::Uri::port(), SBuf::rawContent(), PeerSelector::request, ROTATE_LEFT, and HttpRequest::url.
Referenced by PeerSelector::selectSomeParent().
◆ peerSortWeight()
|
static |
Variable Documentation
◆ carpCachemgr
|
static |
Definition at line 34 of file carp.cc.
Referenced by carpRegisterWithCacheManager().