Skip to content

Commit

Permalink
feat: support castagnoli for crc32 (#419)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Nov 25, 2024
1 parent 4bb7e96 commit f79271f
Show file tree
Hide file tree
Showing 8 changed files with 595 additions and 589 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.0.174"
version = "2.0.175"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
873 changes: 439 additions & 434 deletions pkg/apis/common/v2/common.pb.go

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pkg/apis/common/v2/common.pb.validate.go

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

8 changes: 4 additions & 4 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ message Task {
// Download url.
string url = 3 [(validate.rules).string.uri = true];
// Digest of the task digest, for example blake3:xxx or sha256:yyy.
optional string digest = 4 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8})$", ignore_empty: true}];
optional string digest = 4 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8}(?:[a-fA-F0-9]{2})?)$", ignore_empty: true}];
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
Expand Down Expand Up @@ -221,7 +221,7 @@ message PersistentCacheTask {
// the persistent cache task will be deleted when dfdaemon runs garbage collection.
uint64 current_replica_count = 4;
// Digest of the task digest, for example blake3:xxx or sha256:yyy.
string digest = 5 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8})$"}];
string digest = 5 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8}(?:[a-fA-F0-9]{2})?)$"}];
// Tag is used to distinguish different persistent cache tasks.
optional string tag = 6;
// Application of task.
Expand Down Expand Up @@ -398,7 +398,7 @@ message Download {
// Download url.
string url = 1 [(validate.rules).string.uri = true];
// Digest of the task digest, for example blake3:xxx or sha256:yyy.
optional string digest = 2 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8})$", ignore_empty: true}];
optional string digest = 2 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8}(?:[a-fA-F0-9]{2})?)$", ignore_empty: true}];
// Range is url range of request. If protocol is http, range
// will set in request header. If protocol is others, range
// will set in range field.
Expand Down Expand Up @@ -484,7 +484,7 @@ message Piece {
// Piece length.
uint64 length = 4;
// Digest of the piece data, for example blake3:xxx or sha256:yyy.
string digest = 5 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8})$", ignore_empty: true}];
string digest = 5 [(validate.rules).string = {pattern: "^(md5:[a-fA-F0-9]{32}|sha1:[a-fA-F0-9]{40}|sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}|blake3:[a-fA-F0-9]{64}|crc32:[a-fA-F0-9]{8}(?:[a-fA-F0-9]{2})?)$", ignore_empty: true}];
// Piece content.
optional bytes content = 6 [(validate.rules).bytes = {min_len: 1, ignore_empty: true}];
// Traffic type.
Expand Down
Loading

0 comments on commit f79271f

Please sign in to comment.