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 content_length to DownloadTaskResponse #219

Merged
merged 1 commit into from
Nov 20, 2023
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.53"
version = "2.0.54"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
107 changes: 59 additions & 48 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.go

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

2 changes: 2 additions & 0 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.validate.go

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

5 changes: 4 additions & 1 deletion pkg/apis/dfdaemon/v2/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ message DownloadTaskRequest {

// DownloadTaskResponse represents response of DownloadTask.
message DownloadTaskResponse {
// Task content length.
int64 content_length = 1;

// Finished piece of task.
common.v2.Piece piece = 1 [(validate.rules).message.required = true];
common.v2.Piece piece = 2 [(validate.rules).message.required = true];
}

// UploadTaskRequest represents request of UploadTask.
Expand Down
5 changes: 4 additions & 1 deletion proto/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ message DownloadTaskRequest {

// DownloadTaskResponse represents response of DownloadTask.
message DownloadTaskResponse {
// Task content length.
int64 content_length = 1;

// Finished piece of task.
common.v2.Piece piece = 1;
common.v2.Piece piece = 2;
}

// UploadTaskRequest represents request of UploadTask.
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
5 changes: 4 additions & 1 deletion src/dfdaemon.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ pub struct DownloadTaskRequest {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadTaskResponse {
/// Task content length.
#[prost(int64, tag = "1")]
pub content_length: i64,
/// Finished piece of task.
#[prost(message, optional, tag = "1")]
#[prost(message, optional, tag = "2")]
pub piece: ::core::option::Option<super::super::common::v2::Piece>,
}
/// UploadTaskRequest represents request of UploadTask.
Expand Down
Loading