General eCAP configuration. More...
#include <Config.h>
Public Types | |
typedef std::vector< ServiceConfigPointer > | ServiceConfigs |
Public Member Functions | |
Config () | |
~Config () override | |
bool | finalize () override |
void | parseService (void) |
void | freeService (void) |
void | dumpService (StoreEntry *, const char *) const |
ServiceConfigPointer | findServiceConfig (const String &) |
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 | |
Adaptation::ServiceConfig * | newServiceConfig () const override |
creates service configuration object that will parse and keep cfg info More... | |
virtual void | clear () |
Removes any reference to the services from configuration. 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 &) |
Adaptation::ServicePointer | createService (const ServiceConfigPointer &cfg) override |
Static Private Member Functions | |
static void | ParseServiceGroup (ServiceGroupPointer group) |
static void | FreeServiceGroups (void) |
static void | DumpServiceGroups (StoreEntry *, const char *) |
Detailed Description
Member Typedef Documentation
◆ ServiceConfigs
|
inherited |
Constructor & Destructor Documentation
◆ Config() [1/2]
◆ ~Config()
|
overridevirtual |
Reimplemented from Adaptation::Config.
◆ Config() [2/2]
|
private |
Member Function Documentation
◆ clear()
|
protectedvirtualinherited |
Definition at line 121 of file Config.cc.
References Adaptation::AllGroups(), Adaptation::AllRules(), debugs, and size.
◆ createService()
|
overrideprivatevirtual |
Implements Adaptation::Config.
◆ DumpAccess()
|
staticinherited |
Definition at line 299 of file Config.cc.
References Adaptation::AllRules(), dump_acl_access(), LOCAL_ARRAY, SQUIDSTRINGPH, and SQUIDSTRINGPRINT.
◆ dumpService()
|
inherited |
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()
|
staticprivateinherited |
Definition at line 270 of file Config.cc.
References Adaptation::AllGroups(), SQUIDSTRINGPH, SQUIDSTRINGPRINT, and storeAppendPrintf().
◆ finalize()
|
overridevirtual |
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 from Adaptation::Config.
Definition at line 27 of file Config.cc.
References Adaptation::AllServices(), Adaptation::Ecap::CheckUnusedAdapterServices(), Adaptation::Config::finalize(), and Adaptation::Ecap::Host::Register().
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ Finalize()
|
staticinherited |
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()
|
inherited |
◆ FreeAccess()
|
staticinherited |
Definition at line 290 of file Config.cc.
References Adaptation::AllRules().
◆ freeService()
|
inherited |
Definition at line 146 of file Config.cc.
References Adaptation::DetachServices().
Referenced by free_ecap_service_type(), free_icap_service_type(), and SquidShutdown().
◆ FreeServiceGroups()
|
staticprivateinherited |
Definition at line 261 of file Config.cc.
References Adaptation::AllGroups().
◆ newServiceConfig()
|
overrideprotectedvirtual |
Reimplemented from Adaptation::Config.
◆ operator=()
◆ ParseAccess()
|
staticinherited |
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()
|
inherited |
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()
|
staticinherited |
Definition at line 247 of file Config.cc.
References Adaptation::Config::ParseServiceGroup().
Referenced by parse_adaptation_service_chain_type().
◆ ParseServiceGroup()
|
staticprivateinherited |
Definition at line 253 of file Config.cc.
References Adaptation::AllGroups(), assert, and Adaptation::ServiceGroup::parse().
Referenced by Adaptation::Config::ParseServiceChain(), and Adaptation::Config::ParseServiceSet().
◆ ParseServiceSet()
|
staticinherited |
Definition at line 241 of file Config.cc.
References Adaptation::Config::ParseServiceGroup().
Referenced by parse_adaptation_service_set_type(), and parse_icap_class_type().
◆ removeRule()
|
protectedinherited |
Definition at line 103 of file Config.cc.
References Adaptation::AllRules(), debugs, and Adaptation::AccessRule::groupId.
◆ removeService()
|
protectedinherited |
Definition at line 60 of file Config.cc.
References Adaptation::AllGroups(), debugs, Adaptation::ServiceGroup::id, Adaptation::ServiceGroup::removedServices, and Adaptation::ServiceGroup::services.
Member Data Documentation
◆ Enabled
|
staticinherited |
Definition at line 42 of file Config.h.
Referenced by Adaptation::AccessCheck::Start().
◆ masterx_shared_name
|
staticinherited |
◆ metaHeaders
|
staticinherited |
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
|
staticinherited |
Definition at line 60 of file Config.h.
Referenced by ACLAdaptationServiceData::parse(), Adaptation::Iterator::start(), and Adaptation::Iterator::step().
◆ oldest_service_failure
|
inherited |
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
|
inherited |
Definition at line 53 of file Config.h.
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ send_client_ip
|
staticinherited |
Definition at line 47 of file Config.h.
Referenced by Adaptation::Ecap::XactionRep::clientIpValue(), and Adaptation::Icap::ModXact::makeRequestHeaders().
◆ send_username
|
staticinherited |
Definition at line 48 of file Config.h.
Referenced by Adaptation::Icap::ModXact::makeRequestHeaders().
◆ service_failure_limit
|
inherited |
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
|
staticinherited |
Definition at line 46 of file Config.h.
Referenced by Adaptation::Iterator::step().
◆ service_revival_delay
|
inherited |
Definition at line 56 of file Config.h.
Referenced by Adaptation::Icap::ServiceRep::optionsFetchTime(), and Adaptation::Icap::ServiceRep::suspend().
◆ serviceConfigs
|
inherited |
◆ use_indirect_client
|
staticinherited |
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: