| 56 | } |
| 57 | |
| 58 | ananas::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 | |
| 74 | ananas::Future<std::pair<bool, std::string>> AFCConsulModule::DelKeyValue(const std::string& key) |
| 75 | { |
nothing calls this directly
no test coverage detected