-
Notifications
You must be signed in to change notification settings - Fork 0
Implement bulk delete #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
9353561
4a6752c
25e8c2e
d654670
a25a108
2c6589d
0e54fec
352fcb3
7c0356d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ use ::metrics::counter; | |||||
| use object_store::{path::Path, ObjectStore}; | ||||||
|
|
||||||
| use tokio_util::io::StreamReader; | ||||||
| use std::{ffi::{c_char, c_void}, sync::Arc}; | ||||||
| use std::{ffi::{c_char, c_void, CString}, sync::{atomic::{AtomicUsize, Ordering}, Arc}}; | ||||||
| use futures_util::{stream, StreamExt}; | ||||||
| use tokio::io::{AsyncRead, AsyncReadExt, AsyncWriteExt}; | ||||||
|
|
||||||
|
|
@@ -44,6 +44,88 @@ impl RawResponse for Response { | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| // ================================================================================================ | ||||||
| // Boiler plate code for FFI structs | ||||||
| // Any non-copy fields of ListEntry must be properly destroyed on destroy_list_entries | ||||||
| #[repr(C)] | ||||||
| pub struct BulkFailedEntry { | ||||||
| path: *const c_char, | ||||||
| error_message: *const c_char | ||||||
| } | ||||||
| unsafe impl Send for BulkFailedEntry {} | ||||||
|
|
||||||
| // Only stores paths of entries that the bulk operation failed on | ||||||
| #[repr(C)] | ||||||
| pub struct BulkResponse { | ||||||
| result: CResult, | ||||||
| failed_entries: *const BulkFailedEntry, | ||||||
| failed_count: u64, | ||||||
| error_message: *mut c_char, | ||||||
| context: *const Context | ||||||
| } | ||||||
|
|
||||||
| unsafe impl Send for BulkResponse {} | ||||||
|
|
||||||
| impl RawResponse for BulkResponse { | ||||||
| type Payload = Vec<(Path, String)>; | ||||||
|
||||||
| type Payload = Vec<(Path, String)>; | |
| type Payload = Vec<(Path, crate::Error)>; |
Uh oh!
There was an error while loading. Please reload this page.