#include <Config.h>
Public Types | |
typedef std::vector< ServiceConfigPointer > | ServiceConfigs |
Public Member Functions | |
Config () | |
virtual | ~Config () |
void | parseService (void) |
void | freeService (void) |
void | dumpService (StoreEntry *, const char *) const |
ServiceConfigPointer | findServiceConfig (const String &) |
virtual bool | finalize () |
Static Public Member Functions | |
static void | Finalize (bool enable) |
static void | ParseServiceSet (void) |
static void | ParseServiceChain (void) |
static void | ParseAccess (ConfigParser &parser) |
static void | FreeAccess (void) |
static void | DumpAccess (StoreEntry *, const char *) |
Public Attributes | |
int | onoff |
int | service_failure_limit |
time_t | oldest_service_failure |
int | service_revival_delay |
ServiceConfigs | serviceConfigs |
Static Public Attributes | |
static bool | Enabled = false |
static char * | masterx_shared_name = nullptr |
static int | service_iteration_limit = 16 |
static int | send_client_ip = false |
static int | send_username = false |
static int | use_indirect_client = true |
static Notes | metaHeaders |
The list of configured meta headers. More... | |
static bool | needHistory = false |
HttpRequest adaptation history should recorded. More... | |
Protected Member Functions | |
virtual void | clear () |
Removes any reference to the services from configuration. More... | |
virtual ServiceConfig * | newServiceConfig () const |
creates service configuration object that will parse and keep cfg info More... | |
void | removeService (const String &service) |
Removes the given service from all service groups. More... | |
void | removeRule (const String &id) |
Removes access rules of the given service or group. More... | |
Private Member Functions | |
Config (const Config &) | |
Config & | operator= (const Config &) |
virtual ServicePointer | createService (const ServiceConfigPointer &cfg)=0 |
Static Private Member Functions | |
static void | ParseServiceGroup (ServiceGroupPointer group) |
static void | FreeServiceGroups (void) |
static void | DumpServiceGroups (StoreEntry *, const char *) |
Friends | |
class | AccessCheck |
Detailed Description
Member Typedef Documentation
◆ ServiceConfigs
Constructor & Destructor Documentation
◆ Config() [1/2]
◆ ~Config()
|
virtual |
Reimplemented in Adaptation::Ecap::Config, and Adaptation::Icap::Config.
◆ Config() [2/2]
|
private |
Member Function Documentation
◆ clear()
|
protectedvirtual |
Definition at line 121 of file Config.cc.
References Adaptation::AllGroups(), Adaptation::AllRules(), debugs, and size.
◆ createService()
|
privatepure virtual |
Implemented in Adaptation::Ecap::Config, and Adaptation::Icap::Config.
◆ DumpAccess()
|
static |
Definition at line 299 of file Config.cc.
References Adaptation::AllRules(), dump_acl_access(), LOCAL_ARRAY, SQUIDSTRINGPH, and SQUIDSTRINGPRINT.
◆ dumpService()
void Adaptation::Config::dumpService | ( | StoreEntry * | entry, |
const char * | name | ||
) | const |
Definition at line 157 of file Config.cc.
References Adaptation::AllServices(), Adaptation::ServiceConfig::bypass, String::caseCmp(), Adaptation::ServiceConfig::connectionEncryption, Security::PeerOptions::encryptTransport, Adaptation::ServiceConfig::key, Adaptation::ServiceConfig::methodStr(), Adaptation::ServiceConfig::protocol, Adaptation::ServiceConfig::secure, SQUIDSTRINGPH, SQUIDSTRINGPRINT, storeAppendPrintf(), Adaptation::ServiceConfig::uri, and Adaptation::ServiceConfig::vectPointStr().
Referenced by dump_ecap_service_type(), and dump_icap_service_type().
◆ DumpServiceGroups()
|
staticprivate |
Definition at line 270 of file Config.cc.
References Adaptation::AllGroups(), SQUIDSTRINGPH, SQUIDSTRINGPRINT, and storeAppendPrintf().
◆ finalize()
|
virtual |
Creates and starts the adaptation services. In the case the adaptation mechanism is disabled then removes any reference to the services from access rules and service groups, and returns false.
- Returns
- true if the services are ready and running, false otherwise
Reimplemented in Adaptation::Ecap::Config.
Definition at line 184 of file Config.cc.
References Adaptation::AllServices(), DBG_CRITICAL, debugs, Adaptation::FindService(), and Adaptation::ServiceConfig::key.
Referenced by Adaptation::Ecap::Config::finalize(), mainInitialize(), and mainReconfigureFinish().
◆ Finalize()
|
static |
Definition at line 230 of file Config.cc.
References Adaptation::AllGroups(), Adaptation::AllRules(), Adaptation::AllServices(), debugs, FinalizeEach(), and Important.
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ findServiceConfig()
Adaptation::ServiceConfigPointer Adaptation::Config::findServiceConfig | ( | const String & | service | ) |
◆ FreeAccess()
|
static |
Definition at line 290 of file Config.cc.
References Adaptation::AllRules().
◆ freeService()
void Adaptation::Config::freeService | ( | void | ) |
Definition at line 146 of file Config.cc.
References Adaptation::DetachServices().
Referenced by free_ecap_service_type(), free_icap_service_type(), and SquidShutdown().
◆ FreeServiceGroups()
|
staticprivate |
Definition at line 261 of file Config.cc.
References Adaptation::AllGroups().
◆ newServiceConfig()
|
protectedvirtual |
Reimplemented in Adaptation::Ecap::Config.
◆ operator=()
◆ ParseAccess()
|
static |
Definition at line 278 of file Config.cc.
References Adaptation::AllRules(), Adaptation::FindRuleByGroupId(), ConfigParser::NextToken(), and Adaptation::AccessRule::parse().
Referenced by parse_adaptation_access_type(), and parse_icap_access_type().
◆ parseService()
void Adaptation::Config::parseService | ( | void | ) |
Definition at line 135 of file Config.cc.
References cfg_filename, config_lineno, fatalf(), and Adaptation::ServiceConfig::parse().
Referenced by parse_ecap_service_type(), and parse_icap_service_type().
◆ ParseServiceChain()
|
static |
Definition at line 247 of file Config.cc.
References ParseServiceGroup().
Referenced by parse_adaptation_service_chain_type().
◆ ParseServiceGroup()
|
staticprivate |
Definition at line 253 of file Config.cc.
References Adaptation::AllGroups(), assert, and Adaptation::ServiceGroup::parse().
Referenced by ParseServiceChain(), and ParseServiceSet().
◆ ParseServiceSet()
|
static |
Definition at line 241 of file Config.cc.
References ParseServiceGroup().
Referenced by parse_adaptation_service_set_type(), and parse_icap_class_type().
◆ removeRule()
|
protected |
Definition at line 103 of file Config.cc.
References Adaptation::AllRules(), debugs, and Adaptation::AccessRule::groupId.
◆ removeService()
|
protected |
Definition at line 60 of file Config.cc.
References Adaptation::AllGroups(), debugs, Adaptation::ServiceGroup::id, Adaptation::ServiceGroup::removedServices, and Adaptation::ServiceGroup::services.
Friends And Related Function Documentation
◆ AccessCheck
|
friend |
Member Data Documentation
◆ Enabled
|
static |
Definition at line 42 of file Config.h.
Referenced by Adaptation::AccessCheck::Start().
◆ masterx_shared_name
|
static |
◆ metaHeaders
|
static |
Definition at line 58 of file Config.h.
Referenced by accessLogInit(), Adaptation::Icap::ModXact::makeRequestHeaders(), Adaptation::Ecap::XactionRep::metaValue(), Adaptation::Ecap::XactionRep::start(), and Adaptation::Ecap::XactionRep::visitEachMetaHeader().
◆ needHistory
|
static |
Definition at line 60 of file Config.h.
Referenced by ACLAdaptationServiceData::parse(), Adaptation::Iterator::start(), and Adaptation::Iterator::step().
◆ oldest_service_failure
time_t Adaptation::Config::oldest_service_failure |
Definition at line 55 of file Config.h.
Referenced by dump_icap_service_failure_limit(), Adaptation::Icap::ServiceRep::finalize(), free_icap_service_failure_limit(), Adaptation::Icap::ServiceRep::noteFailure(), and parse_icap_service_failure_limit().
◆ onoff
int Adaptation::Config::onoff |
Definition at line 53 of file Config.h.
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ send_client_ip
|
static |
Definition at line 47 of file Config.h.
Referenced by Adaptation::Ecap::XactionRep::clientIpValue(), and Adaptation::Icap::ModXact::makeRequestHeaders().
◆ send_username
|
static |
Definition at line 48 of file Config.h.
Referenced by Adaptation::Icap::ModXact::makeRequestHeaders().
◆ service_failure_limit
int Adaptation::Config::service_failure_limit |
Definition at line 54 of file Config.h.
Referenced by dump_icap_service_failure_limit(), free_icap_service_failure_limit(), Adaptation::Icap::ServiceRep::noteFailure(), and parse_icap_service_failure_limit().
◆ service_iteration_limit
|
static |
Definition at line 46 of file Config.h.
Referenced by Adaptation::Iterator::step().
◆ service_revival_delay
int Adaptation::Config::service_revival_delay |
Definition at line 56 of file Config.h.
Referenced by Adaptation::Icap::ServiceRep::optionsFetchTime(), and Adaptation::Icap::ServiceRep::suspend().
◆ serviceConfigs
ServiceConfigs Adaptation::Config::serviceConfigs |
◆ use_indirect_client
|
static |
Definition at line 49 of file Config.h.
Referenced by Adaptation::Ecap::XactionRep::clientIpValue(), and Adaptation::Icap::ModXact::makeRequestHeaders().
The documentation for this class was generated from the following files: