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

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Jan 2, 2025
1 parent 190d05d commit 38c8f3a
Show file tree
Hide file tree
Showing 10 changed files with 498 additions and 190 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
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.extern_path(".google.protobuf.Timestamp", "::prost_wkt_types::Timestamp")
.extern_path(".google.protobuf.Duration", "::prost_wkt_types::Duration")
.out_dir("src")
.compile(
.compile_protos(

Check failure on line 13 in build.rs

View workflow job for this annotation

GitHub Actions / Rust Lint

no method named `compile_protos` found for struct `tonic_build::Builder` in the current scope
&[
"proto/common.proto",
"proto/errordetails.proto",
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.

Loading

0 comments on commit 38c8f3a

Please sign in to comment.