Skip to content

Commit

Permalink
feat: set output_path to optional and add need_piece_content for down…
Browse files Browse the repository at this point in the history
…loading persistent cache (#435)

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jan 2, 2025
1 parent 190d05d commit 502a8fb
Show file tree
Hide file tree
Showing 9 changed files with 497 additions and 189 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

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.1.1"
version = "2.1.2"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
359 changes: 186 additions & 173 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.go

Large diffs are not rendered by default.

30 changes: 20 additions & 10 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.

4 changes: 3 additions & 1 deletion pkg/apis/dfdaemon/v2/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ message DownloadPersistentCacheTaskRequest {
// Application of task.
optional string application = 4;
// File path to be exported.
string output_path = 5 [(validate.rules).string.min_len = 1];
optional string output_path = 5 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Download timeout.
optional google.protobuf.Duration timeout = 6;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 7;
}

// DownloadPersistentCacheTaskStartedResponse represents task download started response of DownloadPersistentCacheTaskResponse.
Expand Down
278 changes: 278 additions & 0 deletions pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go

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

4 changes: 3 additions & 1 deletion proto/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ message DownloadPersistentCacheTaskRequest {
// Application of task.
optional string application = 4;
// File path to be exported.
string output_path = 5;
optional string output_path = 5;
// Download timeout.
optional google.protobuf.Duration timeout = 6;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 7;
}

// DownloadPersistentCacheTaskStartedResponse represents task download started response of DownloadPersistentCacheTaskResponse.
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
Loading

0 comments on commit 502a8fb

Please sign in to comment.