MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / SetKeyValue

Method SetKeyValue

src/plugin/consul/src/AFCConsulModule.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58ananas::Future<std::pair<bool, std::string>> AFCConsulModule::SetKeyValue(
59 const std::string& key, const std::string& value)
60{
61 ananas::Promise<std::pair<bool, std::string>> promise;
62 if (key.empty())
63 {
64 promise.SetValue(std::make_pair(false, std::string()));
65 return promise.GetFuture();
66 }
67
68 std::map<std::string, std::string> params;
69 std::vector<std::string> cookies;
70 return m_pHttpClientModule->AsyncRequest(brynet::net::http::HttpRequest::HTTP_METHOD::HTTP_METHOD_PUT, consul_ip_,
71 consul_port_, KV_API, params, cookies, value);
72}
73
74ananas::Future<std::pair<bool, std::string>> AFCConsulModule::DelKeyValue(const std::string& key)
75{

Callers

nothing calls this directly

Calls 4

GetFutureMethod · 0.80
emptyMethod · 0.45
SetValueMethod · 0.45
AsyncRequestMethod · 0.45

Tested by

no test coverage detected