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

Method keys

plugins/experimental/wasm/lib/src/shared_data.cc:59–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59WasmResult SharedData::keys(std::string_view vm_id, std::vector<std::string> *result) {
60 result->clear();
61
62 std::lock_guard<std::mutex> lock(mutex_);
63 auto map = data_.find(std::string(vm_id));
64 if (map == data_.end()) {
65 return WasmResult::Ok;
66 }
67
68 for (const auto &kv : map->second) {
69 result->push_back(kv.first);
70 }
71
72 return WasmResult::Ok;
73}
74
75WasmResult SharedData::set(std::string_view vm_id, std::string_view key, std::string_view value,
76 uint32_t cas) {

Callers 4

print_classFunction · 0.80
_process_eventsMethod · 0.80
getSharedDataKeysMethod · 0.80
mainFunction · 0.80

Calls 5

stringClass · 0.85
clearMethod · 0.45
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected