Skip to content

Commit

Permalink
add sync_host to DfdaemonUploadClient
Browse files Browse the repository at this point in the history
Signed-off-by: baowj <[email protected]>
  • Loading branch information
baowj-678 committed Jan 22, 2025
1 parent 85fc8f6 commit a0c64c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dragonfly-client/src/grpc/dfdaemon_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,17 @@ impl DfdaemonUploadClient {
Ok(response.into_inner())
}

/// sync_pieces provides the piece metadata for parent.
#[instrument(skip_all)]
pub async fn sync_host(
&self,
request: SyncHostRequest,
) -> ClientResult<tonic::Response<tonic::codec::Streaming<Host>>> {
let request = Self::make_request(request);
let response = self.client.clone().sync_host(request).await?;
Ok(response)
}

/// make_request creates a new request with timeout.
#[instrument(skip_all)]
fn make_request<T>(request: T) -> tonic::Request<T> {
Expand Down

0 comments on commit a0c64c0

Please sign in to comment.