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

Method addCapture

plugins/cachekey/configs.cc:90–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void
91ConfigElements::addCapture(const char *arg)
92{
93 StringView args(arg);
94 StringView::size_type pos = args.find_first_of(':');
95 if (StringView::npos != pos) {
96 String name(args.substr(0, pos));
97 if (!name.empty()) {
98 String pattern(args.substr(pos + 1));
99 if (!pattern.empty()) {
100 if (!setCapture(name, pattern)) {
101 CacheKeyError("failed to add capture: '%s'", arg);
102 }
103 } else {
104 CacheKeyError("missing pattern in capture: '%s'", arg);
105 }
106 } else {
107 CacheKeyError("missing element name in capture: %s", arg);
108 }
109 } else {
110 CacheKeyError("invalid capture: %s, should be 'name:<capture_definition>", arg);
111 }
112}
113
114void
115ConfigElements::setExcludePatterns(const char *arg)

Callers 1

initMethod · 0.80

Calls 2

substrMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected