MCPcopy Create free account
hub / github.com/apache/brpc / RemoveByPathString

Method RemoveByPathString

src/brpc/restful.cpp:387–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387size_t RestfulMap::RemoveByPathString(const std::string& path) {
388 // removal only happens when server stops, clear _sorted_paths to make
389 // sure wild pointers do not exist.
390 if (!_sorted_paths.empty()) {
391 _sorted_paths.clear();
392 }
393 return _dedup_map.erase(path);
394}
395
396struct PrefixLess {
397 bool operator()(const butil::StringPiece& path,

Callers 1

RemoveMethodsOfMethod · 0.80

Calls 3

emptyMethod · 0.45
clearMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected