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

Method make_tree_node

src/traffic_ctl/FileConfigCommand.cc:194–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void
195FlatYAMLAccessor::make_tree_node(swoc::TextView variable, swoc::TextView value, swoc::TextView tag, YAML::Emitter &out)
196{
197 auto const key{variable.take_prefix_at('.')};
198 auto const key_str = std::string{key.data(), key.size()};
199 if (variable.empty()) {
200 out << YAML::BeginMap << YAML::Key << key_str;
201 if (!tag.empty()) {
202 out << YAML::VerbatimTag(get_tag(tag));
203 }
204 out << YAML::Value << std::string{value.data(), value.size()} << YAML::EndMap;
205 } else {
206 out << YAML::BeginMap << YAML::Key << key_str;
207 make_tree_node(variable, value, tag, out);
208 out << YAML::EndMap;
209 }
210}
211
212FileConfigCommand::FileConfigCommand(ts::Arguments *args) : CtrlCommand(args)
213{

Callers

nothing calls this directly

Calls 6

VerbatimTagFunction · 0.85
get_tagFunction · 0.85
take_prefix_atMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected