MCPcopy Create free account
hub / github.com/apache/kvrocks / GetByToken

Method GetByToken

src/server/namespace.cc:115–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115StatusOr<std::string> Namespace::GetByToken(const std::string& token) {
116 std::shared_lock lock(tokens_mu_);
117 auto iter = tokens_.find(token);
118 if (iter == tokens_.end()) {
119 return {Status::NotFound};
120 }
121 return iter->second;
122}
123
124Status Namespace::Set(const std::string& ns, const std::string& token) {
125 auto s = IsNamespaceLegal(ns);

Callers 1

AuthenticateUserMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected