#include <ParentSelection.h>
Inherits ControlBase.
Public Member Functions | |
ParentRecord () | |
~ParentRecord () | |
char * | Init (matcher_line *line_info) |
bool | DefaultInit (char *val) |
established by a config variable | |
void | UpdateMatch (ParentResult *result, RequestData *rdata) |
void | FindParent (bool firstCall, ParentResult *result, RequestData *rdata, ParentConfigParams *config) |
void | Print () |
bool | bypass_ok () const |
const char * | ProcessParents (char *val) |
void | buildConsistentHash (void) |
Data Fields | |
pRecord * | parents |
int | num_parents |
const char * | scheme |
ParentRR_t | round_robin |
volatile uint32_t | rr_next |
bool | go_direct |
ATSConsistentHash * | chash |
Definition at line 189 of file ParentSelection.h.
ParentRecord::ParentRecord | ( | ) | [inline] |
Definition at line 192 of file ParentSelection.h.
ParentRecord::~ParentRecord | ( | ) |
Definition at line 942 of file ParentSelection.cc.
References ats_free(), chash, and parents.
void ParentRecord::buildConsistentHash | ( | void | ) |
Definition at line 804 of file ParentSelection.cc.
References chash, ATSConsistentHash::insert(), num_parents, and parents.
Referenced by Init().
bool ParentRecord::bypass_ok | ( | ) | const [inline] |
Definition at line 206 of file ParentSelection.h.
References go_direct.
Referenced by find_server_and_update_current_info(), and FindParent().
bool ParentRecord::DefaultInit | ( | char * | val | ) |
established by a config variable
Definition at line 781 of file ParentSelection.cc.
References ats_free(), ats_malloc(), go_direct, modulePrefix, ProcessParents(), round_robin, scheme, and SignalError.
Referenced by createDefaultParent().
void ParentRecord::FindParent | ( | bool | firstCall, | |
ParentResult * | result, | |||
RequestData * | rdata, | |||
ParentConfigParams * | config | |||
) |
Definition at line 482 of file ParentSelection.cc.
References ats_ip_hash(), bypass_ok(), chash, ParentResult::chashIter, Debug, ParentConfigParams::DNS_ParentOnly, Error, pRecord::failCount, pRecord::failedAt, ParentConfigParams::FailThreshold, ParentResult::foundParents, RequestData::get_client_ip(), RequestData::get_string(), go_direct, pRecord::hostname, ParentResult::hostname, pRecord::idx, ink_assert, ink_release_assert, ParentResult::last_parent, ATSConsistentHash::lookup(), num_parents, P_CONSISTENT_HASH, P_HASH_ROUND_ROBIN, P_NO_ROUND_ROBIN, P_STRICT_ROUND_ROBIN, ParentConfigParams::ParentRetryTime, parents, pRecord::port, ParentResult::port, ParentResult::r, ParentResult::retry, round_robin, rr_next, ParentResult::start_parent, ParentResult::wrap_around, and HttpRequestData::xact_start.
Referenced by ParentConfigParams::findParent(), and ParentConfigParams::nextParent().
char * ParentRecord::Init | ( | matcher_line * | line_info | ) |
Definition at line 829 of file ParentSelection.cc.
References ats_malloc(), buildConsistentHash(), ControlBase::getSchemeModText(), go_direct, matcher_line::line, matcher_line::line_num, ControlBase::line_num, MATCHER_MAX_TOKENS, modulePrefix, matcher_line::num_el, num_parents, P_CONSISTENT_HASH, parents, ControlBase::ProcessModifiers(), ProcessParents(), round_robin, pRecord::scheme, scheme, and val.
void ParentRecord::Print | ( | ) |
Reimplemented from ControlBase.
Definition at line 951 of file ParentSelection.cc.
References go_direct, num_parents, ParentRRStr, parents, and round_robin.
Referenced by SocksServerConfig::print(), and ParentConfig::print().
const char * ParentRecord::ProcessParents | ( | char * | val | ) |
Definition at line 674 of file ParentSelection.cc.
References ats_free(), ats_malloc(), ATSConsistentHashNode::available, pRecord::failedAt, pRecord::hostname, pRecord::idx, Tokenizer::Initialize(), is_digit(), ParseRules::is_wslfcr(), memcpy, ATSConsistentHashNode::name, num_parents, parents, pRecord::port, scheme, pRecord::scheme, SHARE_TOKS, and pRecord::weight.
Referenced by DefaultInit(), and Init().
void ParentRecord::UpdateMatch | ( | ParentResult * | result, | |
RequestData * | rdata | |||
) |
Definition at line 932 of file ParentSelection.cc.
References ControlBase::CheckForMatch(), Debug, ControlBase::line_num, ParentResult::line_number, and ParentResult::rec.
Definition at line 215 of file ParentSelection.h.
Referenced by buildConsistentHash(), FindParent(), and ~ParentRecord().
Definition at line 214 of file ParentSelection.h.
Referenced by bypass_ok(), DefaultInit(), FindParent(), Init(), Print(), and setup_socks_servers().
Definition at line 204 of file ParentSelection.h.
Referenced by buildConsistentHash(), FindParent(), Init(), ParentConfigParams::markParentDown(), Print(), ProcessParents(), ParentConfigParams::recordRetrySuccess(), and setup_socks_servers().
Definition at line 203 of file ParentSelection.h.
Referenced by buildConsistentHash(), FindParent(), Init(), ParentConfigParams::markParentDown(), Print(), ProcessParents(), ParentConfigParams::recordRetrySuccess(), setup_socks_servers(), and ~ParentRecord().
Definition at line 212 of file ParentSelection.h.
Referenced by DefaultInit(), FindParent(), Init(), and Print().
volatile uint32_t ParentRecord::rr_next |
Definition at line 213 of file ParentSelection.h.
Referenced by FindParent().
const char* ParentRecord::scheme |
Definition at line 208 of file ParentSelection.h.
Referenced by DefaultInit(), Init(), and ProcessParents().