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

Function argparser_runroot_handler

src/tscore/runroot.cc:154–171  ·  view source on GitHub ↗

This is a temporary approach to handle runroot with migration to ArgParser. When all program use ArgParser, we can remove the runroot_handler below and replace it with this one.

Source from the content-addressed store, hash-verified

152// This is a temporary approach to handle runroot with migration to ArgParser.
153// When all program use ArgParser, we can remove the runroot_handler below and replace it with this one.
154void
155argparser_runroot_handler(std::string const &value, const char *executable, bool json)
156{
157 // 1.if --run-root is provided
158 if (!value.empty()) {
159 std::string path = get_yaml_path(value);
160 if (!path.empty()) {
161 if (!json) {
162 ink_notice("using command line path as RUNROOT");
163 }
164 runroot_file = path;
165 return;
166 } else if (!json) {
167 ink_warning("Unable to access runroot: '%s'", value.c_str());
168 }
169 }
170 runroot_extra_handling(executable, json);
171}
172
173// handler for ts runroot
174// this function set up runroot_file

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 6

get_yaml_pathFunction · 0.85
ink_noticeFunction · 0.85
ink_warningFunction · 0.85
runroot_extra_handlingFunction · 0.85
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected