Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383008
D5004.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5004.diff
View Options
diff --git a/services/backup/blob_client/src/lib.rs b/services/backup/blob_client/src/lib.rs
--- a/services/backup/blob_client/src/lib.rs
+++ b/services/backup/blob_client/src/lib.rs
@@ -10,9 +10,12 @@
#[cxx::bridge]
mod ffi {
extern "Rust" {
- fn put_client_initialize_cxx() -> ();
- fn put_client_blocking_read_cxx() -> ();
- unsafe fn put_client_write_cxx(data: *const c_char) -> ();
- fn put_client_terminate_cxx() -> ();
+ fn put_client_initialize_cxx() -> Result<()>;
+ unsafe fn put_client_write_cxx(
+ field_index: usize,
+ data: *const c_char,
+ ) -> Result<()>;
+ fn put_client_blocking_read_cxx() -> Result<String>;
+ fn put_client_terminate_cxx() -> Result<()>;
}
}
diff --git a/services/backup/blob_client/src/put_client.rs b/services/backup/blob_client/src/put_client.rs
--- a/services/backup/blob_client/src/put_client.rs
+++ b/services/backup/blob_client/src/put_client.rs
@@ -1,17 +1,26 @@
use libc::c_char;
-pub fn put_client_initialize_cxx() -> () {
+pub fn put_client_initialize_cxx() -> Result<(), String> {
unimplemented!();
}
-pub fn put_client_blocking_read_cxx() -> () {
+pub fn put_client_blocking_read_cxx() -> Result<String, String> {
unimplemented!();
}
-pub fn put_client_write_cxx(data: *const c_char) -> () {
+/**
+ * field index:
+ * 1 - holder (utf8 string)
+ * 2 - blob hash (utf8 string)
+ * 3 - data chunk (bytes)
+ */
+pub fn put_client_write_cxx(
+ field_index: usize,
+ data: *const c_char,
+) -> Result<(), String> {
unimplemented!();
}
-pub fn put_client_terminate_cxx() -> () {
+pub fn put_client_terminate_cxx() -> Result<(), String> {
unimplemented!();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 1:03 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597076
Default Alt Text
D5004.diff (1 KB)
Attached To
Mode
D5004: [services] Backup - Blob Put Client - Update put API
Attached
Detach File
Event Timeline
Log In to Comment