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

Method insert

src/api/ConfigUpdateCbTable.cc:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28ConfigUpdateCbTable::~ConfigUpdateCbTable() {}
29
30void
31ConfigUpdateCbTable::insert(INKContInternal *contp, const char *name, const char *file_name)
32{
33 ink_assert(contp != nullptr);
34 ink_assert(name != nullptr);
35
36 if (nullptr != file_name) {
37 swoc::file::path file_path{file_name};
38 std::error_code ec;
39 auto timestamp = swoc::file::last_write_time(file_path, ec);
40
41 if (!ec) {
42 cb_table.emplace(name, std::make_tuple(contp, file_path, timestamp));
43 } else {
44 Error("Failed to stat %s: %s", file_path.c_str(), ec.message().c_str());
45 }
46 } else {
47 cb_table.emplace(name, std::make_tuple(contp, swoc::file::path{}, swoc::file::file_time_type{}));
48 }
49}
50
51void
52ConfigUpdateCbTable::invoke()

Callers 2

TSCacheHttpInfoVectorFunction · 0.45
TSMgmtUpdateRegisterFunction · 0.45

Calls 5

last_write_timeFunction · 0.85
emplaceMethod · 0.80
ErrorClass · 0.50
c_strMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected