Skip to content

Commit

Permalink
chore: Remove unnecessary expose of methods for ObjStoreClient
Browse files Browse the repository at this point in the history
Signed-off-by: Piyush Singariya <piyushsingariya@gmail.com>
  • Loading branch information
piyushsingariya committed Sep 29, 2024
1 parent 1cc9b49 commit f78794d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions server/src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
}
}

pub async fn _get_object(&self, path: &RelativePath) -> Result<Bytes, ObjectStorageError> {
async fn _get_object(&self, path: &RelativePath) -> Result<Bytes, ObjectStorageError> {
let instant = Instant::now();

let resp = self.client.get(&to_object_store_path(path)).await;
Expand All @@ -261,7 +261,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
}
}

pub async fn _put_object(
async fn _put_object(
&self,
path: &RelativePath,
resource: PutPayload,
Expand All @@ -286,7 +286,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
resp.map(|_| ()).map_err(|err| err.into())
}

pub async fn _delete_prefix(&self, key: &str) -> Result<(), ObjectStorageError> {
async fn _delete_prefix(&self, key: &str) -> Result<(), ObjectStorageError> {
let object_stream = self.client.list(Some(&(key.into())));

object_stream
Expand All @@ -307,7 +307,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
Ok(())
}

pub async fn _list_streams(&self) -> Result<Vec<LogStream>, ObjectStorageError> {
async fn _list_streams(&self) -> Result<Vec<LogStream>, ObjectStorageError> {
let resp = self.client.list_with_delimiter(None).await?;

let common_prefixes = resp.common_prefixes; // get all dirs
Expand Down Expand Up @@ -337,7 +337,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
Ok(dirs.into_iter().map(|name| LogStream { name }).collect())
}

pub async fn _list_dates(&self, stream: &str) -> Result<Vec<String>, ObjectStorageError> {
async fn _list_dates(&self, stream: &str) -> Result<Vec<String>, ObjectStorageError> {
let resp = self
.client
.list_with_delimiter(Some(&(stream.into())))
Expand All @@ -355,7 +355,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
Ok(dates)
}

pub async fn _list_manifest_files(
async fn _list_manifest_files(
&self,
stream: &str,
) -> Result<BTreeMap<String, Vec<String>>, ObjectStorageError> {
Expand Down Expand Up @@ -385,7 +385,7 @@ impl<T: ObjectStore> ObjStoreClient <T> {
}
Ok(result_file_list)
}
pub async fn _upload_file(&self, key: &str, path: &StdPath) -> Result<(), ObjectStorageError> {
async fn _upload_file(&self, key: &str, path: &StdPath) -> Result<(), ObjectStorageError> {
let instant = Instant::now();

// // TODO: Uncomment this when multipart is fixed
Expand Down

0 comments on commit f78794d

Please sign in to comment.