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

Method find_node

src/traffic_ctl/FileConfigCommand.cc:178–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178std::pair<bool, YAML::Node>
179FlatYAMLAccessor::find_node(swoc::TextView variable)
180{
181 if (_docs.size() > 0) { // make sure there is something
182 // We start from the bottom.
183 for (auto iter = std::rbegin(_docs); iter != std::rend(_docs); ++iter) {
184 if (auto [found, node] = search_node(variable, *iter, DO_NOT_CREATE_IF_NOT_EXIST); found) {
185 // found it.
186 return {true, node};
187 }
188 }
189 }
190
191 return NOT_FOUND; // couldn't find the node;
192}
193
194void
195FlatYAMLAccessor::make_tree_node(swoc::TextView variable, swoc::TextView value, swoc::TextView tag, YAML::Emitter &out)

Callers

nothing calls this directly

Calls 2

search_nodeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected