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

Method BuildTable

src/proxy/ControlMatcher.cc:930–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928
929template <class Data, class MatchResult>
930int
931ControlMatcher<Data, MatchResult>::BuildTable()
932{
933 std::error_code ec;
934 std::string content{swoc::file::load(swoc::file::path{config_file_path}, ec)};
935 if (ec) {
936 switch (ec.value()) {
937 case ENOENT:
938 Warning("ControlMatcher - Cannot open config file: %s - %s", config_file_path, strerror(ec.value()));
939 break;
940 default:
941 Error("ControlMatcher - %s failed to load: %s", config_file_path, strerror(ec.value()));
942 return 1;
943 }
944 }
945
946 return BuildTableFromString(content.data());
947}
948
949/****************************************************************
950 * TEMPLATE INSTANTIATIONS GO HERE

Callers 1

ControlMatcherMethod · 0.95

Calls 4

loadFunction · 0.50
ErrorClass · 0.50
valueMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected