Squid Web Cache master
Loading...
Searching...
No Matches
XactionInitiator.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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/Stream.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 {"cache-digest", initCacheDigest},
26 {"server", initServer},
27 {"htcp", initHtcp},
28 {"icp", initIcp},
29 {"icmp", initIcmp},
30 {"ipc", initIpc},
31 {"adaptation", initAdaptation},
32 {"icon", initIcon},
33 {"peer-mcast", initPeerMcast},
34 {"internal", InternalInitiators()},
35 {"all", AllInitiators()}
36 };
37 const auto it = SupportedInitiators.find(name);
38 if (it != SupportedInitiators.cend())
39 return it->second;
40
41 debugs(28, DBG_CRITICAL, "FATAL: Invalid transaction_initiator value near " << name);
43 return 0;
44}
45
void self_destruct(void)
Definition cache_cf.cc:275
static Initiators ParseInitiators(const char *name)
@ initPeerMcast
neighbor multicast
@ initIcp
the ICP/neighbors subsystem
@ initIcmp
the ICMP RTT database (NetDB) neighbors exchange subsystem
@ initAdaptation
ICAP/ECAP requests generated by Squid.
@ initHtcp
HTCP client.
@ initServer
HTTP/2 push request (not yet supported by Squid)
@ initCacheDigest
Cache Digest fetching code.
@ initIcon
internal icons
@ initPeerPool
PeerPool manager.
@ initCertFetcher
Missing intermediate certificates fetching code.
@ initClient
HTTP or FTP client.
@ initIpc
the IPC subsystem
static Initiators AllInitiators()
all initiators
static Initiators InternalInitiators()
internally generated requests
uint32_t Initiators
Initiator set.
#define debugs(SECTION, LEVEL, CONTENT)
Definition Stream.h:192
#define DBG_CRITICAL
Definition Stream.h:37