2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
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.
12 #include "XactionInitiator.h"
17 XactionInitiator::Initiators
18 XactionInitiator::ParseInitiators(const char *name
)
20 typedef std::map
<std::string
, XactionInitiator::Initiators
> InitiatorsMap
;
21 static InitiatorsMap SupportedInitiators
= {
22 {"client", initClient
},
23 {"peer-pool", initPeerPool
},
24 {"certificate-fetching", initCertFetcher
},
26 {"cache-digest", initCacheDigest
},
27 {"server", initServer
},
33 {"adaptation", initAdaptation
},
35 {"peer-mcast", initPeerMcast
},
36 {"internal", InternalInitiators()},
37 {"all", AllInitiators()}
39 const auto it
= SupportedInitiators
.find(name
);
40 if (it
!= SupportedInitiators
.cend())
43 debugs(28, DBG_CRITICAL
, "FATAL: Invalid transaction_initiator value near " << name
);