Depends on D4945
This is the rest of the remaining functionalities for the put client to work. I realize that this diff is big and dirty but adding this as a draft, I may break this down in the future.
Paths
| Differential D4946 Authored by • karol on Aug 24 2022, 5:57 AM.
Details Summary Depends on D4945 This is the rest of the remaining functionalities for the put client to work. I realize that this diff is big and dirty but adding this as a draft, I may break this down in the future. Test Plan Test code: #include <iostream> #include <sstream> #include "blob_client/src/lib.rs.h" //... try { std::cout << "CALLING RUST CODE" << std::endl; put_client_initialize_cxx(); put_client_write_cxx(0, "holder009"); put_client_blocking_read_cxx(); put_client_write_cxx(1, "hash005"); rust::String responseStr = put_client_blocking_read_cxx(); const char *value = responseStr.c_str(); unsigned int intValue; std::stringstream strValue; strValue << value; strValue >> intValue; bool dataExists = (bool)intValue; std::cout << "response if the data exists: " << dataExists << std::endl; if (dataExists) { std::cout << "data exists, skipping sending chunks" << std::endl; } else { std::cout << "data doesn't exist, sending chunks" << std::endl; put_client_write_cxx(2, "data CHUNK :):):)"); } // rust::Vec<rust::String> errorMessages = put_client_terminate_cxx(); // std::cout << "terminated rust client, errors: " << errorMessages.size() // << std::endl; // for (auto it = errorMessages.begin(); it != errorMessages.end(); ++it) { // std::cout << "=> " << it->c_str() << std::endl; // } put_client_terminate_cxx(); std::cout << "CALLED RUST CODE" << std::endl; } catch (const std::exception &err) { std::cout << "rust error: " << err.what() << std::endl; }
Diff Detail
Event TimelineHerald added subscribers: • abosh, atul, tomek, ashoat. · View Herald TranscriptAug 24 2022, 5:57 AM2022-08-24 05:57:53 (UTC-7) • karol retitled this revision from [services] Backup - Connect to Blob - Update put client to [DRAFT] [services] Backup - Connect to Blob - Update put client.Aug 24 2022, 6:05 AM2022-08-24 06:05:44 (UTC-7) Harbormaster completed remote builds in B11582: Diff 15923.Aug 24 2022, 6:08 AM2022-08-24 06:08:19 (UTC-7) Comment Actions This diff modifies the code that was introduced in the same stack and is not yet landed: e.g. it deletes transmitter_handle. If we don't need that, please update the diff that introduces it. I know it's a draft, but before having a final solution please split this diff so that each of them contains just one thing. This one introduces a couple of new concepts.
This revision now requires changes to proceed.Aug 29 2022, 5:12 AM2022-08-29 05:12:25 (UTC-7) Herald added a reviewer: • jon. · View Herald TranscriptAug 29 2022, 5:12 AM2022-08-29 05:12:25 (UTC-7)
Comment Actions Abandoning this stack in favor of the new one that starts @ D5002. All the comments have been either addressed inline or in the new stack. Comment Actions Abandoning this stack in favor of the new one that starts @ D5002. All the comments have been either addressed inline or in the new stack.
Revision Contents
Diff 15923 services/backup/blob_client/Cargo.lock
services/backup/blob_client/Cargo.toml
services/backup/blob_client/src/constants.rs
services/backup/blob_client/src/put_client.rs
|