Skip to content

Commit

Permalink
feat: change download_rate_limit from double to uint64
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Nov 20, 2023
1 parent 8fdd8c8 commit fde5316
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 84 deletions.
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.52"
version = "2.0.53"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
157 changes: 78 additions & 79 deletions pkg/apis/common/v2/common.pb.go

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

2 changes: 1 addition & 1 deletion pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ message Download {
// Download timeout.
optional google.protobuf.Duration timeout = 12 [(validate.rules).duration.required = true];
// Download rate limit in bytes per second.
optional double download_rate_limit = 13 [(validate.rules).double.gte = 0];
optional uint64 download_rate_limit = 13 [(validate.rules).uint64.gte = 0];
// NeedBackToSource needs downloaded from source.
bool need_back_to_source = 14;
}
Expand Down
2 changes: 1 addition & 1 deletion proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ message Download {
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Download rate limit in bytes per second.
optional double download_rate_limit = 13;
optional uint64 download_rate_limit = 13;
// NeedBackToSource needs downloaded from source.
bool need_back_to_source = 14;
}
Expand Down
4 changes: 2 additions & 2 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ pub struct Download {
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
/// Download rate limit in bytes per second.
#[prost(double, optional, tag = "13")]
pub download_rate_limit: ::core::option::Option<f64>,
#[prost(uint64, optional, tag = "13")]
pub download_rate_limit: ::core::option::Option<u64>,
/// NeedBackToSource needs downloaded from source.
#[prost(bool, tag = "14")]
pub need_back_to_source: bool,
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.

0 comments on commit fde5316

Please sign in to comment.