Skip to content
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

feat: add ParentSelector #936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dragonfly-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ futures-util = "0.3.31"
termion = "4.0.3"
tabled = "0.17.0"
path-absolutize = "3.1.1"
rand = "0.8.5"

[dev-dependencies]
tempfile.workspace = true
Expand Down
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 @@ -1276,6 +1276,17 @@ impl DfdaemonUploadClient {
Ok(())
}

/// 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
1 change: 1 addition & 0 deletions dragonfly-client/src/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

mod parent_selector;
pub mod persistent_cache_task;
pub mod piece;
pub mod piece_collector;
Expand Down
Loading
Loading