MCPcopy Create free account
hub / github.com/apache/trafficserver / initHRWLibraries

Function initHRWLibraries

plugins/header_rewrite/header_rewrite.cc:52–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50} // namespace header_rewrite_ns
51
52static void
53initHRWLibraries(const std::string &dbPath)
54{
55 header_rewrite_ns::plugin_factory.setRuntimeDir(RecConfigReadRuntimeDir()).addSearchDir(RecConfigReadPluginDir());
56
57 if (dbPath.empty()) {
58 return;
59 }
60
61 Dbg(pi_dbg_ctl, "Loading geo db %s", dbPath.c_str());
62
63#if TS_USE_HRW_GEOIP
64 GeoIPConditionGeo::initLibrary(dbPath);
65#elif TS_USE_HRW_MAXMINDDB
66 MMConditionGeo::initLibrary(dbPath);
67#endif
68}
69
70// Forward declaration for the main continuation.
71static int cont_rewrite_headers(TSCont, TSEvent, void *);

Callers 2

TSPluginInitFunction · 0.85
TSRemapNewInstanceFunction · 0.85

Calls 4

RecConfigReadRuntimeDirFunction · 0.85
RecConfigReadPluginDirFunction · 0.85
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected