mirror of
https://github.com/huggingface/xet-core.git
synced 2026-06-04 13:30:29 +08:00
feat: expose FileUploadSession low-level functions (#855)
This commit is contained in:
@@ -611,7 +611,8 @@ impl FileUploadSession {
|
||||
/// Register a pre-composed file reconstruction plan (MDBFileInfo) with this session.
|
||||
/// Used for append-aware writes where the caller builds the reconstruction plan
|
||||
/// from existing segments + newly uploaded segments.
|
||||
pub(crate) async fn register_composed_file(self: &Arc<Self>, file_info: MDBFileInfo) -> Result<()> {
|
||||
pub async fn register_composed_file(self: &Arc<Self>, file_info: MDBFileInfo) -> Result<()> {
|
||||
self.check_not_finalized()?;
|
||||
self.shard_interface.add_file_reconstruction_info(file_info).await
|
||||
}
|
||||
|
||||
@@ -622,6 +623,10 @@ impl FileUploadSession {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn client(&self) -> Arc<dyn Client + Send + Sync> {
|
||||
Arc::clone(&self.client)
|
||||
}
|
||||
|
||||
pub fn progress(&self) -> &Arc<GroupProgress> {
|
||||
&self.progress
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user