#endif
using namespace std::chrono_literals;
+using storage::remote::Client;
namespace {
}
int
-cmd_get(storage::remote::Client& client, const std::vector<std::string>& args)
+cmd_get(Client& client, const std::vector<std::string>& args)
{
if (args.size() != 3 || args[1] != "-o") {
PRINT(stderr, "Error: get requires: KEY -o OUTPUT\n");
}
int
-cmd_put(storage::remote::Client& client, const std::vector<std::string>& args)
+cmd_put(Client& client, const std::vector<std::string>& args)
{
- storage::remote::Client::PutFlags flags;
+ Client::PutFlags flags;
size_t start_idx = 0;
if (!args.empty() && args[0] == "--overwrite") {
}
int
-cmd_remove(storage::remote::Client& client,
- const std::vector<std::string>& args)
+cmd_remove(Client& client, const std::vector<std::string>& args)
{
if (args.size() != 1) {
PRINT(stderr, "Error: remove requires exactly 1 argument: KEY\n");
}
int
-cmd_stop(storage::remote::Client& client, const std::vector<std::string>& args)
+cmd_stop(Client& client, const std::vector<std::string>& args)
{
if (!args.empty()) {
PRINT(stderr, "Error: stop takes no arguments\n");
cmd_args.push_back(argv[i]);
}
- storage::remote::Client client(k_data_timeout, k_request_timeout);
+ Client client(k_data_timeout, k_request_timeout);
auto connect_result = client.connect(ipc_endpoint);
if (!connect_result) {
return 1;
}
- if (!client.has_capability(
- storage::remote::Client::Capability::get_put_remove_stop)) {
- PRINT(stderr, "Helper does not support get/put/remove/stop operations\n");
+ if (!client.has_capability(Client::Capability::get_put_remove_stop)) {
+ PRINT(stderr,
+ "Helper does not support capability {}\n",
+ to_string(Client::Capability::get_put_remove_stop));
return 1;
}