XactionInitiator.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 #include "cache_cf.h"
11 #include "Debug.h"
12 #include "XactionInitiator.h"
13 
14 #include <map>
15 #include <string>
16 
19 {
20  typedef std::map<std::string, XactionInitiator::Initiators> InitiatorsMap;
21  static InitiatorsMap SupportedInitiators = {
22  {"client", initClient},
23  {"peer-pool", initPeerPool},
24  {"certificate-fetching", initCertFetcher},
25  {"esi", initEsi},
26  {"cache-digest", initCacheDigest},
27  {"server", initServer},
28  {"htcp", initHtcp},
29  {"icp", initIcp},
30  {"icmp", initIcmp},
31  {"asn", initAsn},
32  {"ipc", initIpc},
33  {"adaptation", initAdaptation},
34  {"icon", initIcon},
35  {"peer-mcast", initPeerMcast},
36  {"internal", InternalInitiators()},
37  {"all", AllInitiators()}
38  };
39  const auto it = SupportedInitiators.find(name);
40  if (it != SupportedInitiators.cend())
41  return it->second;
42 
43  debugs(28, DBG_CRITICAL, "FATAL: Invalid transaction_initiator value near " << name);
44  self_destruct();
45  return 0;
46 }
47 
void self_destruct(void)
Definition: cache_cf.cc:255
Cache Digest fetching code.
Missing intermediate certificates fetching code.
#define DBG_CRITICAL
Definition: Debug.h:44
static Initiators AllInitiators()
all initiators
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
static Initiators ParseInitiators(const char *name)
uint32_t Initiators
Initiator set.
ICAP/ECAP requests generated by Squid.
the ASN db subsystem
ESI processing code.
the ICP/neighbors subsystem
static Initiators InternalInitiators()
internally generated requests
the ICMP RTT database (NetDB) neighbors exchange subsystem
HTTP/2 push request (not yet supported by Squid)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors