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

Method setCapture

plugins/cachekey/configs.cc:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73bool
74ConfigElements::setCapture(const String &name, const String &pattern)
75{
76 auto it = _captures.find(name);
77 if (_captures.end() == it) {
78 auto mp = new MultiPattern(name);
79 if (nullptr != mp) {
80 _captures[name] = mp;
81 } else {
82 return false;
83 }
84 }
85 setPattern(*_captures[name], pattern.c_str());
86 CacheKeyDebug("added capture pattern '%s' for element '%s'", pattern.c_str(), name.c_str());
87 return true;
88}
89
90void
91ConfigElements::addCapture(const char *arg)

Callers

nothing calls this directly

Calls 4

setPatternFunction · 0.85
findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected