| 57 | } |
| 58 | |
| 59 | WasmResult 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 | |
| 75 | WasmResult SharedData::set(std::string_view vm_id, std::string_view key, std::string_view value, |
| 76 | uint32_t cas) { |
no test coverage detected