#include "squid.h"
#include "CachePeer.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 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 int | n_carp_peers = 0 |
static CachePeer ** | carp_peers = nullptr |
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 224 of file carp.cc.
References CachePeer::carp, Config, CachePeer::fetches, CachePeer::name, CachePeer::next, SquidConfig::peers, CachePeer::stats, and storeAppendPrintf().
◆ carpInit()
void carpInit | ( | void | ) |
Definition at line 44 of file carp.cc.
References assert, CachePeer::carp, carp_peers, carpRegisterWithCacheManager(), cbdataReference, cbdataReferenceDone, Config, double, int, n_carp_peers, CachePeer::name, CachePeer::next, CachePeer::options, PEER_PARENT, SquidConfig::peers, peerSortWeight(), ROTATE_LEFT, safe_free, CachePeer::type, CachePeer::weight, and xcalloc().
Referenced by serverConnectionsOpen().
◆ carpRegisterWithCacheManager()
|
static |
Definition at line 38 of file carp.cc.
References carpCachemgr, and Mgr::RegisterAction().
Referenced by carpInit().
◆ carpSelectParent()
CachePeer * carpSelectParent | ( | PeerSelector * | ps | ) |
Definition at line 147 of file carp.cc.
References SBuf::append(), SBuf::appendf(), assert, CachePeer::carp, CachePeer::carp_key, carp_peers, debugs, HttpRequest::effectiveRequestUri(), AnyP::Uri::getScheme(), AnyP::Uri::host(), CachePeer::host, AnyP::UriScheme::image(), SBuf::isEmpty(), SBuf::length(), n_carp_peers, SBuf::npos, CachePeer::options, CachePeer::params, AnyP::Uri::path(), CachePeer::path, peerHTTPOkay(), AnyP::Uri::port(), CachePeer::port, SBuf::rawContent(), PeerSelector::request, ROTATE_LEFT, CachePeer::scheme, CachePeer::set, and HttpRequest::url.
Referenced by PeerSelector::selectSomeParent().
◆ peerSortWeight()
|
static |
Variable Documentation
◆ carp_peers
|
static |
Definition at line 26 of file carp.cc.
Referenced by carpInit(), and carpSelectParent().
◆ carpCachemgr
|
static |
Definition at line 27 of file carp.cc.
Referenced by carpRegisterWithCacheManager().
◆ n_carp_peers
|
static |
Definition at line 25 of file carp.cc.
Referenced by carpInit(), and carpSelectParent().