Compare commits

...

16 Commits

Author SHA1 Message Date
Gaius ca65aba1ec
feat(api): add security token to ObjectStorage (#537)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-09-01 20:21:31 +08:00
Chlins Zhang 9aac8e2b9c
feat: add proxy port to host in v1 scheduler.AnnounceHostRequest (#536)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2025-08-25 17:35:02 +08:00
Chlins Zhang a46c1b9c85
feat: add proxy port to host in v1 (#535)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2025-08-25 17:03:32 +08:00
Chlins Zhang b6d2590f97
feat: add proxy port to common.Host (#530)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2025-08-18 20:22:31 +08:00
dependabot[bot] d31f58d7dc
chore(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.7 (#528)
Bumps google.golang.org/protobuf from 1.36.6 to 1.36.7.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-13 11:42:15 +08:00
Gaius 959325fec5
feat: set optional for rx_bandwidth and tx_bandwidth (#525)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-08-08 18:45:13 +08:00
Gaius 913cb29c09
feat: add bandwidth for network (#524)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-08-08 16:44:10 +08:00
this is my name dbd1bc4d38
feat: add remote_ip in DeleteCacheTaskRequest (#523)
Signed-off-by: fu220 <2863318196@qq.com>
2025-08-04 13:34:37 +08:00
Gaius 603db45223
feat: add files for StatImage (#522)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-08-04 11:11:48 +08:00
dependabot[bot] e15d4cec24
chore(deps): bump tokio from 1.47.0 to 1.47.1 (#521)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.47.0 to 1.47.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.47.0...tokio-1.47.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.47.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 10:33:54 +08:00
Gaius e16aad3f23
feat: add insecure_skip_verify and certificate_chain for PreheatImage (#518)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-08-01 14:14:22 +08:00
dependabot[bot] 96a6f1a224
chore(deps): bump tokio from 1.46.1 to 1.47.0 (#515) 2025-08-01 10:11:50 +08:00
dependabot[bot] 1e5544f041
chore(deps): bump google.golang.org/grpc from 1.73.0 to 1.74.2 (#516) 2025-08-01 10:11:44 +08:00
Gaius cd8b9986c1
feat(golang/proto): add PreheatImage and StatImage for scheduler
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-07-29 19:39:46 +08:00
Gaius 7662562f49
feat: add PreheatImage and StatImage for scheduler (#517)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-07-29 19:03:37 +08:00
this is my name 80c539463b
feat: add Cache Task mechanism (#512)
* # Description
This pull request introduces APIs for the new Cache Task mechanism, enabling support for memory cache operations. Additionally, by refactoring the Download model and removing the load_to_cache field, the Task component now focuses exclusively on disk I/O operations, while the Cache Task handles memory cache operations. Finally, the version number of the dragonfly-api package has been incremented.

## Key Changes

### common.proto
- Added a new enum type Cache to TaskType to identify CacheTask.
- Introduced a new structure CachePeer to represent peers handling cache tasks.
- Added a new structure CacheTask to define metadata for cache tasks.
- Removed the load_to_cache field from the Download structure, as Tasks will no longer handle cache operations.

### dfdaemon.proto
- Added three RPC calls (DownloadCacheTask, StatCacheTask, DeleteCacheTask) to the DfdaemonUpload and DfdaemonDownload services for cache task management.
- Added two RPC calls (SyncCachePieces, DownloadCachePiece) to the DfdaemonUpload service for cache piece synchronization.
- Introduced 9 new message types to support requests and responses for CacheTask downloads.

### scheduler.proto
- Added five RPC calls to the Scheduler service: AnnounceCachePeer, StatCachePeer, DeleteCachePeer for cache peer management. StatCacheTask, DeleteCacheTask for cache task management.
- Introduced 16 new message types to cover the full lifecycle state transitions of cache tasks.

## Version Update
- Incremented the version of the dragonfly-api package from 2.1.47 to 2.1.48 in Cargo.toml to reflect the new changes.

## Related Issue

## Motivation and Context
- Separation of Responsibilities: Tasks now focus exclusively on disk I/O operations, while CacheTask independently handles memory cache management.

Signed-off-by: fu220 <2863318196@qq.com>

* Changed Download and introduced CacheDownload.

- Added more detailed descriptions for the CACHE type in TaskType, while clarifying that the STANDARD type interacts exclusively with disk operations.
- Removed the load_to_cache field and related information from the Download structure.
- Introduced CacheDownload for handling CacheTask downloads.

Signed-off-by: fu220 <2863318196@qq.com>

* Removed CacheDownload and directly merged into the Request

Signed-off-by: fu220 <2863318196@qq.com>

* Allow large_enum_variant in RegisterCachePeerRequest

Signed-off-by: fu220 <2863318196@qq.com>

---------

Signed-off-by: fu220 <2863318196@qq.com>
2025-07-24 18:27:23 +08:00
31 changed files with 18419 additions and 1940 deletions

28
Cargo.lock generated
View File

@ -190,7 +190,7 @@ dependencies = [
[[package]]
name = "dragonfly-api"
version = "2.1.49"
version = "2.1.61"
dependencies = [
"prost 0.13.5",
"prost-types 0.14.1",
@ -443,7 +443,7 @@ dependencies = [
"http-body",
"hyper",
"pin-project-lite",
"socket2",
"socket2 0.5.7",
"tokio",
"tower",
"tower-service",
@ -504,9 +504,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "libc"
version = "0.2.169"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "linux-raw-sys"
@ -958,6 +958,16 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "socket2"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
dependencies = [
"libc",
"windows-sys 0.59.0",
]
[[package]]
name = "syn"
version = "2.0.85"
@ -996,9 +1006,9 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.46.1"
version = "1.47.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038"
dependencies = [
"backtrace",
"bytes",
@ -1007,9 +1017,9 @@ dependencies = [
"mio",
"pin-project-lite",
"slab",
"socket2",
"socket2 0.6.0",
"tokio-macros",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@ -1068,7 +1078,7 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost 0.13.5",
"socket2",
"socket2 0.5.7",
"tokio",
"tokio-stream",
"tower",

View File

@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.1.49"
version = "2.1.61"
authors = ["Gaius <gaius.qi@gmail.com>"]
edition = "2021"
license = "Apache-2.0"
@ -14,7 +14,7 @@ readme = "README.md"
tonic = "0.12.3"
prost = "0.13.5"
prost-types = "0.14.1"
tokio = { version = "1.46.1", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1.47.1", features = ["rt-multi-thread", "macros"] }
serde = { version = "1.0", features = ["derive"] }
prost-wkt-types = "0.6"

View File

@ -7,6 +7,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"scheduler.v2.AnnouncePeerRequest.request",
"#[allow(clippy::large_enum_variant)]",
)
.type_attribute(
"scheduler.v2.AnnounceCachePeerRequest.request",
"#[allow(clippy::large_enum_variant)]",
)
.extern_path(".google.protobuf.Timestamp", "::prost_wkt_types::Timestamp")
.extern_path(".google.protobuf.Duration", "::prost_wkt_types::Duration")
.out_dir("src")

12
go.mod
View File

@ -5,13 +5,13 @@ go 1.23.8
require (
github.com/envoyproxy/protoc-gen-validate v1.2.1
go.uber.org/mock v0.5.2
google.golang.org/grpc v1.73.0
google.golang.org/protobuf v1.36.6
google.golang.org/grpc v1.74.2
google.golang.org/protobuf v1.36.7
)
require (
golang.org/x/net v0.38.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect
)

48
go.sum
View File

@ -1,7 +1,7 @@
github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
@ -12,27 +12,27 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=

View File

@ -963,6 +963,8 @@ type Host struct {
Location string `protobuf:"bytes,7,opt,name=location,proto3" json:"location,omitempty"`
// IDC where the peer host is located.
Idc string `protobuf:"bytes,8,opt,name=idc,proto3" json:"idc,omitempty"`
// Port of proxy server.
ProxyPort int32 `protobuf:"varint,9,opt,name=proxy_port,json=proxyPort,proto3" json:"proxy_port,omitempty"`
}
func (x *Host) Reset() {
@ -1046,6 +1048,13 @@ func (x *Host) GetIdc() string {
return ""
}
func (x *Host) GetProxyPort() int32 {
if x != nil {
return x.ProxyPort
}
return 0
}
var File_pkg_apis_common_v1_common_proto protoreflect.FileDescriptor
var file_pkg_apis_common_v1_common_proto_rawDesc = []byte{
@ -1152,7 +1161,7 @@ var file_pkg_apis_common_v1_common_proto_rawDesc = []byte{
0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0xf8, 0x01, 0x0a,
0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0xa5, 0x02, 0x0a,
0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17,
0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
@ -1168,71 +1177,74 @@ var file_pkg_apis_common_v1_common_proto_rawDesc = []byte{
0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52,
0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x03, 0x69, 0x64, 0x63,
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0,
0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x2a, 0xd9, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x11, 0x0a, 0x0d, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0xc8,
0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x61, 0x76, 0x61,
0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x18,
0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x62,
0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xe9, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x65, 0x65,
0x72, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xfc, 0x0a,
0x12, 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x10, 0xdc, 0x0b, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69,
0x6d, 0x65, 0x4f, 0x75, 0x74, 0x10, 0xe0, 0x0b, 0x12, 0x10, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa0, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c,
0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x46, 0x61, 0x69, 0x6c, 0x10, 0xa1, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x10, 0xa2, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0xa3, 0x1f, 0x12,
0x19, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x69, 0x74, 0x50, 0x69, 0x65,
0x63, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0xa4, 0x1f, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x6c,
0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
0x64, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa5, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x61,
0x69, 0x6c, 0x10, 0xa6, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa7,
0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x53,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa8, 0x1f, 0x12, 0x18, 0x0a,
0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46,
0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb4, 0x22, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64,
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x88, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65,
0x64, 0x4e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10,
0x89, 0x27, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x47,
0x6f, 0x6e, 0x65, 0x10, 0x8a, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50,
0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x8c, 0x27, 0x12, 0x23,
0x0a, 0x1e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x50, 0x69, 0x65, 0x63, 0x65,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c,
0x10, 0x8d, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x8e, 0x27, 0x12, 0x14,
0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
0x72, 0x10, 0x8f, 0x27, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x46, 0x6f, 0x72,
0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x90, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e,
0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c,
0x10, 0xf1, 0x2e, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f,
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x84, 0x32, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x10, 0xd9, 0x36, 0x2a, 0x17, 0x0a, 0x0a, 0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c,
0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x09,
0x53, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52,
0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01,
0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x4e, 0x59, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d,
0x50, 0x54, 0x59, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x10,
0x04, 0x2a, 0x30, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a,
0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x43,
0x61, 0x63, 0x68, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x53, 0x74, 0x6f, 0x72,
0x65, 0x10, 0x02, 0x2a, 0x5e, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12,
0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x30, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
0x45, 0x56, 0x45, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c,
0x32, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x33, 0x10, 0x03, 0x12,
0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
0x45, 0x56, 0x45, 0x4c, 0x35, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c,
0x36, 0x10, 0x06, 0x42, 0x29, 0x5a, 0x27, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x2b, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79,
0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09,
0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79,
0x50, 0x6f, 0x72, 0x74, 0x2a, 0xd9, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x11, 0x0a,
0x0d, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x0c, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0xc8, 0x01, 0x12, 0x16,
0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,
0x62, 0x6c, 0x65, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x4c, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x42,
0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74,
0x65, 0x64, 0x10, 0xe9, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xfc, 0x0a, 0x12, 0x11, 0x0a,
0x0c, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xdc, 0x0b,
0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f,
0x75, 0x74, 0x10, 0xe0, 0x0b, 0x12, 0x10, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x10, 0xa0, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69,
0x6c, 0x10, 0xa1, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x63,
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0xa2, 0x1f,
0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0xa3, 0x1f, 0x12, 0x19, 0x0a, 0x14,
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x69, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52,
0x65, 0x61, 0x64, 0x79, 0x10, 0xa4, 0x1f, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61,
0x69, 0x6c, 0x10, 0xa5, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10,
0xa6, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa7, 0x1f, 0x12, 0x1a,
0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa8, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x6c,
0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
0x64, 0x10, 0xb4, 0x22, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x10, 0x88, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x65,
0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0x89, 0x27, 0x12,
0x12, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x47, 0x6f, 0x6e, 0x65,
0x10, 0x8a, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72,
0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x8c, 0x27, 0x12, 0x23, 0x0a, 0x1e, 0x53,
0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0x8d, 0x27,
0x12, 0x19, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x8e, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x53,
0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x8f,
0x27, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64,
0x64, 0x65, 0x6e, 0x10, 0x90, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73,
0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xf1, 0x2e,
0x12, 0x14, 0x0a, 0x0f, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f,
0x75, 0x6e, 0x64, 0x10, 0x84, 0x32, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd9, 0x36,
0x2a, 0x17, 0x0a, 0x0a, 0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x09,
0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x09, 0x53, 0x69, 0x7a,
0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a,
0x04, 0x54, 0x49, 0x4e, 0x59, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59,
0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x10, 0x04, 0x2a, 0x30,
0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f,
0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x43, 0x61, 0x63, 0x68,
0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x10, 0x02,
0x2a, 0x5e, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06,
0x4c, 0x45, 0x56, 0x45, 0x4c, 0x30, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45,
0x4c, 0x31, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x32, 0x10, 0x02,
0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x33, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06,
0x4c, 0x45, 0x56, 0x45, 0x4c, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45,
0x4c, 0x35, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x36, 0x10, 0x06,
0x42, 0x29, 0x5a, 0x27, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (

View File

@ -1013,6 +1013,17 @@ func (m *Host) validate(all bool) error {
}
if val := m.GetProxyPort(); val < 1024 || val >= 65535 {
err := HostValidationError{
field: "ProxyPort",
reason: "value must be inside range [1024, 65535)",
}
if !all {
return err
}
errors = append(errors, err)
}
if len(errors) > 0 {
return HostMultiError(errors)
}

View File

@ -57,7 +57,7 @@ enum Code {
// Scheduler response error 5000-5999.
SchedError = 5000;
// Client should try to download from source.
SchedNeedBackSource = 5001;
SchedNeedBackSource = 5001;
// Client should disconnect from scheduler.
SchedPeerGone = 5002;
// Peer not found in scheduler.
@ -245,4 +245,6 @@ message Host {
string location = 7 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// IDC where the peer host is located.
string idc = 8 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Port of proxy server.
int32 proxy_port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
}

File diff suppressed because it is too large Load Diff

View File

@ -363,6 +363,335 @@ var _ interface {
ErrorName() string
} = PeerValidationError{}
// Validate checks the field values on CachePeer with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *CachePeer) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CachePeer with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in CachePeerMultiError, or nil
// if none found.
func (m *CachePeer) ValidateAll() error {
return m.validate(true)
}
func (m *CachePeer) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if utf8.RuneCountInString(m.GetId()) < 1 {
err := CachePeerValidationError{
field: "Id",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
if _, ok := Priority_name[int32(m.GetPriority())]; !ok {
err := CachePeerValidationError{
field: "Priority",
reason: "value must be one of the defined enum values",
}
if !all {
return err
}
errors = append(errors, err)
}
if len(m.GetPieces()) > 0 {
if len(m.GetPieces()) < 1 {
err := CachePeerValidationError{
field: "Pieces",
reason: "value must contain at least 1 item(s)",
}
if !all {
return err
}
errors = append(errors, err)
}
for idx, item := range m.GetPieces() {
_, _ = idx, item
if all {
switch v := interface{}(item).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CachePeerValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CachePeerValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CachePeerValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
}
if m.GetCost() == nil {
err := CachePeerValidationError{
field: "Cost",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if utf8.RuneCountInString(m.GetState()) < 1 {
err := CachePeerValidationError{
field: "State",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
if m.GetTask() == nil {
err := CachePeerValidationError{
field: "Task",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if all {
switch v := interface{}(m.GetTask()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Task",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Task",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetTask()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CachePeerValidationError{
field: "Task",
reason: "embedded message failed validation",
cause: err,
}
}
}
if m.GetHost() == nil {
err := CachePeerValidationError{
field: "Host",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if all {
switch v := interface{}(m.GetHost()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Host",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Host",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CachePeerValidationError{
field: "Host",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for NeedBackToSource
if m.GetCreatedAt() == nil {
err := CachePeerValidationError{
field: "CreatedAt",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if m.GetUpdatedAt() == nil {
err := CachePeerValidationError{
field: "UpdatedAt",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if m.Range != nil {
if all {
switch v := interface{}(m.GetRange()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Range",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CachePeerValidationError{
field: "Range",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CachePeerValidationError{
field: "Range",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if len(errors) > 0 {
return CachePeerMultiError(errors)
}
return nil
}
// CachePeerMultiError is an error wrapping multiple validation errors returned
// by CachePeer.ValidateAll() if the designated constraints aren't met.
type CachePeerMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CachePeerMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m CachePeerMultiError) AllErrors() []error { return m }
// CachePeerValidationError is the validation error returned by
// CachePeer.Validate if the designated constraints aren't met.
type CachePeerValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CachePeerValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CachePeerValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CachePeerValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CachePeerValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CachePeerValidationError) ErrorName() string { return "CachePeerValidationError" }
// Error satisfies the builtin error interface
func (e CachePeerValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCachePeer.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CachePeerValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CachePeerValidationError{}
// Validate checks the field values on PersistentCachePeer with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
@ -866,6 +1195,271 @@ var _ interface {
var _Task_Digest_Pattern = regexp.MustCompile("^(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]+)$")
// Validate checks the field values on CacheTask with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *CacheTask) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CacheTask with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in CacheTaskMultiError, or nil
// if none found.
func (m *CacheTask) ValidateAll() error {
return m.validate(true)
}
func (m *CacheTask) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if utf8.RuneCountInString(m.GetId()) < 1 {
err := CacheTaskValidationError{
field: "Id",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
if _, ok := TaskType_name[int32(m.GetType())]; !ok {
err := CacheTaskValidationError{
field: "Type",
reason: "value must be one of the defined enum values",
}
if !all {
return err
}
errors = append(errors, err)
}
if uri, err := url.Parse(m.GetUrl()); err != nil {
err = CacheTaskValidationError{
field: "Url",
reason: "value must be a valid URI",
cause: err,
}
if !all {
return err
}
errors = append(errors, err)
} else if !uri.IsAbs() {
err := CacheTaskValidationError{
field: "Url",
reason: "value must be absolute",
}
if !all {
return err
}
errors = append(errors, err)
}
// no validation rules for RequestHeader
// no validation rules for ContentLength
// no validation rules for PieceCount
// no validation rules for SizeScope
if len(m.GetPieces()) > 0 {
if len(m.GetPieces()) < 1 {
err := CacheTaskValidationError{
field: "Pieces",
reason: "value must contain at least 1 item(s)",
}
if !all {
return err
}
errors = append(errors, err)
}
for idx, item := range m.GetPieces() {
_, _ = idx, item
if all {
switch v := interface{}(item).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CacheTaskValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CacheTaskValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CacheTaskValidationError{
field: fmt.Sprintf("Pieces[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
}
if utf8.RuneCountInString(m.GetState()) < 1 {
err := CacheTaskValidationError{
field: "State",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
// no validation rules for PeerCount
// no validation rules for HasAvailablePeer
if m.GetCreatedAt() == nil {
err := CacheTaskValidationError{
field: "CreatedAt",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if m.GetUpdatedAt() == nil {
err := CacheTaskValidationError{
field: "UpdatedAt",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if m.Digest != nil {
if m.GetDigest() != "" {
if !_CacheTask_Digest_Pattern.MatchString(m.GetDigest()) {
err := CacheTaskValidationError{
field: "Digest",
reason: "value does not match regex 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]+)$\"",
}
if !all {
return err
}
errors = append(errors, err)
}
}
}
if m.Tag != nil {
// no validation rules for Tag
}
if m.Application != nil {
// no validation rules for Application
}
if len(errors) > 0 {
return CacheTaskMultiError(errors)
}
return nil
}
// CacheTaskMultiError is an error wrapping multiple validation errors returned
// by CacheTask.ValidateAll() if the designated constraints aren't met.
type CacheTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CacheTaskMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m CacheTaskMultiError) AllErrors() []error { return m }
// CacheTaskValidationError is the validation error returned by
// CacheTask.Validate if the designated constraints aren't met.
type CacheTaskValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CacheTaskValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CacheTaskValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CacheTaskValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CacheTaskValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CacheTaskValidationError) ErrorName() string { return "CacheTaskValidationError" }
// Error satisfies the builtin error interface
func (e CacheTaskValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCacheTask.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CacheTaskValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CacheTaskValidationError{}
var _CacheTask_Digest_Pattern = regexp.MustCompile("^(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]+)$")
// Validate checks the field values on PersistentCacheTask with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
@ -914,10 +1508,10 @@ func (m *PersistentCacheTask) validate(all bool) error {
// no validation rules for CurrentReplicaCount
if m.GetPieceLength() < 4194304 {
if val := m.GetPieceLength(); val < 4194304 || val > 67108864 {
err := PersistentCacheTaskValidationError{
field: "PieceLength",
reason: "value must be greater than or equal to 4194304",
reason: "value must be inside range [4194304, 67108864]",
}
if !all {
return err
@ -1162,6 +1756,8 @@ func (m *Host) validate(all bool) error {
// no validation rules for DisableShared
// no validation rules for ProxyPort
if m.Cpu != nil {
if all {
@ -1923,13 +2519,9 @@ func (m *Network) validate(all bool) error {
// no validation rules for UploadTcpConnectionCount
// no validation rules for DownloadRate
// no validation rules for MaxRxBandwidth
// no validation rules for DownloadRateLimit
// no validation rules for UploadRate
// no validation rules for UploadRateLimit
// no validation rules for MaxTxBandwidth
if m.Location != nil {
// no validation rules for Location
@ -1939,6 +2531,14 @@ func (m *Network) validate(all bool) error {
// no validation rules for Idc
}
if m.RxBandwidth != nil {
// no validation rules for RxBandwidth
}
if m.TxBandwidth != nil {
// no validation rules for TxBandwidth
}
if len(errors) > 0 {
return NetworkMultiError(errors)
}
@ -2345,8 +2945,6 @@ func (m *Download) validate(all bool) error {
// no validation rules for NeedPieceContent
// no validation rules for LoadToCache
// no validation rules for ForceHardLink
if m.Digest != nil {
@ -2413,10 +3011,10 @@ func (m *Download) validate(all bool) error {
if m.GetPieceLength() != 0 {
if m.GetPieceLength() < 4194304 {
if val := m.GetPieceLength(); val < 4194304 || val > 67108864 {
err := DownloadValidationError{
field: "PieceLength",
reason: "value must be greater than or equal to 4194304",
reason: "value must be inside range [4194304, 67108864]",
}
if !all {
return err
@ -2795,6 +3393,25 @@ func (m *ObjectStorage) validate(all bool) error {
}
if m.SecurityToken != nil {
if m.GetSecurityToken() != "" {
if utf8.RuneCountInString(m.GetSecurityToken()) < 1 {
err := ObjectStorageValidationError{
field: "SecurityToken",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
}
}
if len(errors) > 0 {
return ObjectStorageMultiError(errors)
}

View File

@ -48,7 +48,7 @@ enum TaskType {
// local peer(local cache). When the standard task is never downloaded in the
// P2P cluster, dfdaemon will download the task from the source. When the standard
// task is downloaded in the P2P cluster, dfdaemon will download the task from
// the remote peer or local peer(local cache).
// the remote peer or local peer(local cache), where peers use disk storage to store tasks.
STANDARD = 0;
// PERSISTENT is persistent type of task, it can import file and export file in P2P cluster.
@ -57,11 +57,18 @@ enum TaskType {
// prevent data loss.
PERSISTENT = 1;
// PERSIST_CACHE is persistent cache type of task, it can import file and export file in P2P cluster.
// PERSISTENT_CACHE is persistent cache type of task, it can import file and export file in P2P cluster.
// When the persistent cache task is imported into the P2P cluster, dfdaemon will store
// the task in the peer's disk and copy multiple replicas to remote peers to prevent data loss.
// When the expiration time is reached, task will be deleted in the P2P cluster.
PERSISTENT_CACHE = 2;
// CACHE is cache type of task, it can download from source, remote peer and
// local peer(local cache). When the cache task is never downloaded in the
// P2P cluster, dfdaemon will download the cache task from the source. When the cache
// task is downloaded in the P2P cluster, dfdaemon will download the cache task from
// the remote peer or local peer(local cache), where peers use memory storage to store cache tasks.
CACHE = 3;
}
// TrafficType represents type of traffic.
@ -138,6 +145,32 @@ message Peer {
google.protobuf.Timestamp updated_at = 11 [(validate.rules).timestamp.required = true];
}
// CachePeer metadata.
message CachePeer {
// Peer id.
string id = 1 [(validate.rules).string.min_len = 1];
// Range is url range of request.
optional Range range = 2;
// Peer priority.
Priority priority = 3 [(validate.rules).enum.defined_only = true];
// Pieces of peer.
repeated Piece pieces = 4 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
// Peer downloads costs time.
google.protobuf.Duration cost = 5 [(validate.rules).duration.required = true];
// Peer state.
string state = 6 [(validate.rules).string.min_len = 1];
// CacheTask info.
CacheTask task = 7 [(validate.rules).message.required = true];
// Host info.
Host host = 8 [(validate.rules).message.required = true];
// NeedBackToSource needs downloaded from source.
bool need_back_to_source = 9;
// Peer create time.
google.protobuf.Timestamp created_at = 10 [(validate.rules).timestamp.required = true];
// Peer update time.
google.protobuf.Timestamp updated_at = 11 [(validate.rules).timestamp.required = true];
}
// PersistentCachePeer metadata.
message PersistentCachePeer {
// Peer id.
@ -208,6 +241,53 @@ message Task {
google.protobuf.Timestamp updated_at = 17 [(validate.rules).timestamp.required = true];
}
// CacheTask metadata.
message CacheTask {
// Task id.
string id = 1 [(validate.rules).string.min_len = 1];
// Task type.
TaskType type = 2 [(validate.rules).enum.defined_only = true];
// Download url.
string url = 3 [(validate.rules).string.uri = true];
// Verifies task data integrity after download using a digest. Supports CRC32, SHA256, and SHA512 algorithms.
// Format: `<algorithm>:<hash>`, e.g., `crc32:xxx`, `sha256:yyy`, `sha512:zzz`.
// Returns an error if the computed digest mismatches the expected value.
//
// Performance
// Digest calculation increases processing time. Enable only when data integrity verification is critical.
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]+)$", ignore_empty: true}];
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 7;
// Task request headers.
map<string, string> request_header = 8;
// Task content length.
uint64 content_length = 9;
// Task piece count.
uint32 piece_count = 10;
// Task size scope.
SizeScope size_scope = 11;
// Pieces of task.
repeated Piece pieces = 12 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
// Task state.
string state = 13 [(validate.rules).string.min_len = 1];
// Task peer count.
uint32 peer_count = 14;
// Task contains available peer.
bool has_available_peer = 15;
// Task create time.
google.protobuf.Timestamp created_at = 16 [(validate.rules).timestamp.required = true];
// Task update time.
google.protobuf.Timestamp updated_at = 17 [(validate.rules).timestamp.required = true];
}
// PersistentCacheTask metadata.
message PersistentCacheTask {
// Task id.
@ -228,7 +308,7 @@ message PersistentCacheTask {
// Application of task.
optional string application = 6;
// Task piece length.
uint64 piece_length = 7 [(validate.rules).uint64.gte = 4194304];
uint64 piece_length = 7 [(validate.rules).uint64 = {gte: 4194304, lte: 67108864}];
// Task content length.
uint64 content_length = 8;
// Task piece count.
@ -281,6 +361,8 @@ message Host {
uint64 scheduler_cluster_id = 17;
// Disable shared data for other peers.
bool disable_shared = 18;
// Port of proxy server.
int32 proxy_port = 19;
}
// CPU Stat.
@ -348,14 +430,23 @@ message Network {
optional string location = 3;
// IDC where the peer host is located
optional string idc = 4;
// Download rate is received bytes per second.
uint64 download_rate = 5;
// Download rate is the limit of received bytes per second.
uint64 download_rate_limit = 6;
// Upload rate is transmitted bytes per second.
uint64 upload_rate = 7;
// Upload rate is the limit of transmitted bytes per second.
uint64 upload_rate_limit = 8;
// Maximum bandwidth of the network interface, in bps (bits per second).
uint64 max_rx_bandwidth = 9;
// Receive bandwidth of the network interface, in bps (bits per second).
optional uint64 rx_bandwidth = 10;
// Maximum bandwidth of the network interface for transmission, in bps (bits per second).
uint64 max_tx_bandwidth = 11;
// Transmit bandwidth of the network interface, in bps (bits per second).
optional uint64 tx_bandwidth = 12;
reserved 5;
reserved "download_rate";
reserved 6;
reserved "download_rate_limit";
reserved 7;
reserved "upload_rate";
reserved 8;
reserved "upload_rate_limit";
}
// Disk Stat.
@ -422,8 +513,11 @@ message Download {
repeated string filtered_query_params = 8;
// Task request headers.
map<string, string> request_header = 9;
// Task piece length, the value needs to be greater than or equal to 4194304(4MiB).
optional uint64 piece_length = 10 [(validate.rules).uint64 = {gte: 4194304, ignore_empty: true}];
// Piece Length is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
optional uint64 piece_length = 10 [(validate.rules).uint64 = {gte: 4194304, lte: 67108864, ignore_empty: true}];
// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
// it will copy the file to the output path after the download is completed.
@ -447,10 +541,6 @@ message Download {
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
// Cache storage is designed to store downloaded piece content from preheat tasks,
// allowing other peers to access the content from memory instead of disk.
bool load_to_cache = 21;
// force_hard_link is the flag to indicate whether the download file must be hard linked to the output path.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
bool force_hard_link = 22;
@ -462,6 +552,9 @@ message Download {
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 24 [(validate.rules).string = {ip: true, ignore_empty: true}];
reserved 21;
reserved "load_to_cache";
}
// Object Storage related information.
@ -480,6 +573,8 @@ message ObjectStorage {
optional string credential_path = 6 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Predefined ACL that used for the Google Cloud Storage service.
optional string predefined_acl = 7 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Temporary STS security token for accessing OSS.
optional string security_token = 8 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}
// HDFS related information.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -175,6 +175,163 @@ message DeleteTaskRequest {
optional string remote_ip = 2 [(validate.rules).string = {ip: true, ignore_empty: true}];
}
// DownloadCacheTaskRequest represents request of DownloadCacheTask.
message DownloadCacheTaskRequest {
// 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]+)$", 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.
optional common.v2.Range range = 3;
// Task type.
common.v2.TaskType type = 4 [(validate.rules).enum.defined_only = true];
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Peer priority.
common.v2.Priority priority = 7 [(validate.rules).enum.defined_only = true];
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 8;
// Task request headers.
map<string, string> request_header = 9;
// Task piece length, the value needs to be greater than or equal to 4194304(4MiB).
optional uint64 piece_length = 10 [(validate.rules).uint64 = {gte: 4194304, ignore_empty: true}];
// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
// it will copy the file to the output path after the download is completed.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
optional string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object storage protocol information.
optional common.v2.ObjectStorage object_storage = 17;
// HDFS protocol information.
optional common.v2.HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// content_for_calculating_task_id is the content used to calculate the task id.
// If content_for_calculating_task_id is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
optional string content_for_calculating_task_id = 21;
// remote_ip represents the IP address of the client initiating the download request.
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 22 [(validate.rules).string = {ip: true, ignore_empty: true}];
}
// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.
message DownloadCacheTaskStartedResponse {
// Task content length.
uint64 content_length = 1;
// Range is url range of request. If protocol is http, range
// is parsed from http header. If other protocol, range comes
// from download range field.
optional common.v2.Range range = 2;
// Task response headers.
map<string, string> response_header = 3;
// Need to download pieces.
repeated common.v2.Piece pieces = 4;
// is_finished indicates whether the download task is finished.
bool is_finished = 5;
}
// DownloadCacheTaskResponse represents response of DownloadCacheTask.
message DownloadCacheTaskResponse {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Peer id.
string peer_id = 3 [(validate.rules).string.min_len = 1];
oneof response {
option (validate.required) = true;
DownloadCacheTaskStartedResponse download_cache_task_started_response = 4;
DownloadPieceFinishedResponse download_piece_finished_response = 5;
}
}
// SyncCachePiecesRequest represents request of SyncCachePieces.
message SyncCachePiecesRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Interested piece numbers.
repeated uint32 interested_cache_piece_numbers = 3 [(validate.rules).repeated = {min_items: 1}];
}
// SyncCachePiecesResponse represents response of SyncCachePieces.
message SyncCachePiecesResponse {
// Exist piece number.
uint32 number = 1;
// Piece offset.
uint64 offset = 2;
// Piece length.
uint64 length = 3;
}
// DownloadCachePieceRequest represents request of DownloadCachePiece.
message DownloadCachePieceRequest{
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Piece number.
uint32 piece_number = 3;
}
// DownloadCachePieceResponse represents response of DownloadCachePieces.
message DownloadCachePieceResponse {
// Piece information.
common.v2.Piece piece = 1 [(validate.rules).message.required = true];
// Piece metadata digest, it is used to verify the integrity of the piece metadata.
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]+)$", ignore_empty: true}];
}
// StatCacheTaskRequest represents request of StatCacheTask.
message StatCacheTaskRequest {
// Task id.
string task_id = 1 [(validate.rules).string.min_len = 1];
// Remote IP represents the IP address of the client initiating the stat request.
optional string remote_ip = 2 [(validate.rules).string = {ip: true, ignore_empty: true}];
// local_only specifies whether to query task information from local client only.
// If true, the query will be restricted to the local client.
// By default (false), the query may be forwarded to the scheduler
// for a cluster-wide search.
bool local_only = 3;
}
// DeleteCacheTaskRequest represents request of DeleteCacheTask.
message DeleteCacheTaskRequest {
// Task id.
string task_id = 1 [(validate.rules).string.min_len = 1];
// Remote IP represents the IP address of the client initiating the delete request.
optional string remote_ip = 2 [(validate.rules).string = {ip: true, ignore_empty: true}];
}
// DownloadPersistentCacheTaskRequest represents request of DownloadPersistentCacheTask.
message DownloadPersistentCacheTaskRequest {
// Task id.
@ -371,6 +528,21 @@ service DfdaemonUpload {
// DownloadPiece downloads piece from the remote peer.
rpc DownloadPiece(DownloadPieceRequest)returns(DownloadPieceResponse);
// DownloadCacheTask downloads cache task from p2p network.
rpc DownloadCacheTask(DownloadCacheTaskRequest) returns(stream DownloadCacheTaskResponse);
// StatCacheTask stats cache task information.
rpc StatCacheTask(StatCacheTaskRequest) returns(common.v2.CacheTask);
// DeleteCacheTask deletes cache task from p2p network.
rpc DeleteCacheTask(DeleteCacheTaskRequest) returns(google.protobuf.Empty);
// SyncCachePieces syncs cache piece metadatas from remote peer.
rpc SyncCachePieces(SyncCachePiecesRequest) returns(stream SyncCachePiecesResponse);
// DownloadCachePiece downloads cache piece from the remote peer.
rpc DownloadCachePiece(DownloadCachePieceRequest)returns(DownloadCachePieceResponse);
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);
@ -413,6 +585,15 @@ service DfdaemonDownload {
// DeleteHost releases host in scheduler.
rpc DeleteHost(google.protobuf.Empty)returns(google.protobuf.Empty);
// DownloadCacheTask downloads cache task from p2p network.
rpc DownloadCacheTask(DownloadCacheTaskRequest) returns(stream DownloadCacheTaskResponse);
// StatCacheTask stats cache task information.
rpc StatCacheTask(StatCacheTaskRequest) returns(common.v2.CacheTask);
// DeleteCacheTask deletes cache task from p2p network.
rpc DeleteCacheTask(DeleteCacheTaskRequest) returns(google.protobuf.Empty);
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);

View File

@ -34,6 +34,16 @@ type DfdaemonUploadClient interface {
SyncPieces(ctx context.Context, in *SyncPiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncPiecesClient, error)
// DownloadPiece downloads piece from the remote peer.
DownloadPiece(ctx context.Context, in *DownloadPieceRequest, opts ...grpc.CallOption) (*DownloadPieceResponse, error)
// DownloadCacheTask downloads cache task from p2p network.
DownloadCacheTask(ctx context.Context, in *DownloadCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonUpload_DownloadCacheTaskClient, error)
// StatCacheTask stats cache task information.
StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error)
// DeleteCacheTask deletes cache task from p2p network.
DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// SyncCachePieces syncs cache piece metadatas from remote peer.
SyncCachePieces(ctx context.Context, in *SyncCachePiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncCachePiecesClient, error)
// DownloadCachePiece downloads cache piece from the remote peer.
DownloadCachePiece(ctx context.Context, in *DownloadCachePieceRequest, opts ...grpc.CallOption) (*DownloadCachePieceResponse, error)
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
DownloadPersistentCacheTask(ctx context.Context, in *DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonUpload_DownloadPersistentCacheTaskClient, error)
// UpdatePersistentCacheTask updates metadate of thr persistent cache task in p2p network.
@ -151,8 +161,99 @@ func (c *dfdaemonUploadClient) DownloadPiece(ctx context.Context, in *DownloadPi
return out, nil
}
func (c *dfdaemonUploadClient) DownloadCacheTask(ctx context.Context, in *DownloadCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonUpload_DownloadCacheTaskClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[2], "/dfdaemon.v2.DfdaemonUpload/DownloadCacheTask", opts...)
if err != nil {
return nil, err
}
x := &dfdaemonUploadDownloadCacheTaskClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type DfdaemonUpload_DownloadCacheTaskClient interface {
Recv() (*DownloadCacheTaskResponse, error)
grpc.ClientStream
}
type dfdaemonUploadDownloadCacheTaskClient struct {
grpc.ClientStream
}
func (x *dfdaemonUploadDownloadCacheTaskClient) Recv() (*DownloadCacheTaskResponse, error) {
m := new(DownloadCacheTaskResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dfdaemonUploadClient) StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) {
out := new(v2.CacheTask)
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonUpload/StatCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfdaemonUploadClient) DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonUpload/DeleteCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfdaemonUploadClient) SyncCachePieces(ctx context.Context, in *SyncCachePiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncCachePiecesClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[3], "/dfdaemon.v2.DfdaemonUpload/SyncCachePieces", opts...)
if err != nil {
return nil, err
}
x := &dfdaemonUploadSyncCachePiecesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type DfdaemonUpload_SyncCachePiecesClient interface {
Recv() (*SyncCachePiecesResponse, error)
grpc.ClientStream
}
type dfdaemonUploadSyncCachePiecesClient struct {
grpc.ClientStream
}
func (x *dfdaemonUploadSyncCachePiecesClient) Recv() (*SyncCachePiecesResponse, error) {
m := new(SyncCachePiecesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dfdaemonUploadClient) DownloadCachePiece(ctx context.Context, in *DownloadCachePieceRequest, opts ...grpc.CallOption) (*DownloadCachePieceResponse, error) {
out := new(DownloadCachePieceResponse)
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonUpload/DownloadCachePiece", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfdaemonUploadClient) DownloadPersistentCacheTask(ctx context.Context, in *DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonUpload_DownloadPersistentCacheTaskClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[2], "/dfdaemon.v2.DfdaemonUpload/DownloadPersistentCacheTask", opts...)
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[4], "/dfdaemon.v2.DfdaemonUpload/DownloadPersistentCacheTask", opts...)
if err != nil {
return nil, err
}
@ -211,7 +312,7 @@ func (c *dfdaemonUploadClient) DeletePersistentCacheTask(ctx context.Context, in
}
func (c *dfdaemonUploadClient) SyncPersistentCachePieces(ctx context.Context, in *SyncPersistentCachePiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncPersistentCachePiecesClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[3], "/dfdaemon.v2.DfdaemonUpload/SyncPersistentCachePieces", opts...)
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[5], "/dfdaemon.v2.DfdaemonUpload/SyncPersistentCachePieces", opts...)
if err != nil {
return nil, err
}
@ -252,7 +353,7 @@ func (c *dfdaemonUploadClient) DownloadPersistentCachePiece(ctx context.Context,
}
func (c *dfdaemonUploadClient) SyncHost(ctx context.Context, in *SyncHostRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncHostClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[4], "/dfdaemon.v2.DfdaemonUpload/SyncHost", opts...)
stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[6], "/dfdaemon.v2.DfdaemonUpload/SyncHost", opts...)
if err != nil {
return nil, err
}
@ -306,6 +407,16 @@ type DfdaemonUploadServer interface {
SyncPieces(*SyncPiecesRequest, DfdaemonUpload_SyncPiecesServer) error
// DownloadPiece downloads piece from the remote peer.
DownloadPiece(context.Context, *DownloadPieceRequest) (*DownloadPieceResponse, error)
// DownloadCacheTask downloads cache task from p2p network.
DownloadCacheTask(*DownloadCacheTaskRequest, DfdaemonUpload_DownloadCacheTaskServer) error
// StatCacheTask stats cache task information.
StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error)
// DeleteCacheTask deletes cache task from p2p network.
DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error)
// SyncCachePieces syncs cache piece metadatas from remote peer.
SyncCachePieces(*SyncCachePiecesRequest, DfdaemonUpload_SyncCachePiecesServer) error
// DownloadCachePiece downloads cache piece from the remote peer.
DownloadCachePiece(context.Context, *DownloadCachePieceRequest) (*DownloadCachePieceResponse, error)
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
DownloadPersistentCacheTask(*DownloadPersistentCacheTaskRequest, DfdaemonUpload_DownloadPersistentCacheTaskServer) error
// UpdatePersistentCacheTask updates metadate of thr persistent cache task in p2p network.
@ -343,6 +454,21 @@ func (UnimplementedDfdaemonUploadServer) SyncPieces(*SyncPiecesRequest, Dfdaemon
func (UnimplementedDfdaemonUploadServer) DownloadPiece(context.Context, *DownloadPieceRequest) (*DownloadPieceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DownloadPiece not implemented")
}
func (UnimplementedDfdaemonUploadServer) DownloadCacheTask(*DownloadCacheTaskRequest, DfdaemonUpload_DownloadCacheTaskServer) error {
return status.Errorf(codes.Unimplemented, "method DownloadCacheTask not implemented")
}
func (UnimplementedDfdaemonUploadServer) StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) {
return nil, status.Errorf(codes.Unimplemented, "method StatCacheTask not implemented")
}
func (UnimplementedDfdaemonUploadServer) DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCacheTask not implemented")
}
func (UnimplementedDfdaemonUploadServer) SyncCachePieces(*SyncCachePiecesRequest, DfdaemonUpload_SyncCachePiecesServer) error {
return status.Errorf(codes.Unimplemented, "method SyncCachePieces not implemented")
}
func (UnimplementedDfdaemonUploadServer) DownloadCachePiece(context.Context, *DownloadCachePieceRequest) (*DownloadCachePieceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DownloadCachePiece not implemented")
}
func (UnimplementedDfdaemonUploadServer) DownloadPersistentCacheTask(*DownloadPersistentCacheTaskRequest, DfdaemonUpload_DownloadPersistentCacheTaskServer) error {
return status.Errorf(codes.Unimplemented, "method DownloadPersistentCacheTask not implemented")
}
@ -475,6 +601,102 @@ func _DfdaemonUpload_DownloadPiece_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _DfdaemonUpload_DownloadCacheTask_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DownloadCacheTaskRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DfdaemonUploadServer).DownloadCacheTask(m, &dfdaemonUploadDownloadCacheTaskServer{stream})
}
type DfdaemonUpload_DownloadCacheTaskServer interface {
Send(*DownloadCacheTaskResponse) error
grpc.ServerStream
}
type dfdaemonUploadDownloadCacheTaskServer struct {
grpc.ServerStream
}
func (x *dfdaemonUploadDownloadCacheTaskServer) Send(m *DownloadCacheTaskResponse) error {
return x.ServerStream.SendMsg(m)
}
func _DfdaemonUpload_StatCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfdaemonUploadServer).StatCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dfdaemon.v2.DfdaemonUpload/StatCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfdaemonUploadServer).StatCacheTask(ctx, req.(*StatCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DfdaemonUpload_DeleteCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfdaemonUploadServer).DeleteCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dfdaemon.v2.DfdaemonUpload/DeleteCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfdaemonUploadServer).DeleteCacheTask(ctx, req.(*DeleteCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DfdaemonUpload_SyncCachePieces_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SyncCachePiecesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DfdaemonUploadServer).SyncCachePieces(m, &dfdaemonUploadSyncCachePiecesServer{stream})
}
type DfdaemonUpload_SyncCachePiecesServer interface {
Send(*SyncCachePiecesResponse) error
grpc.ServerStream
}
type dfdaemonUploadSyncCachePiecesServer struct {
grpc.ServerStream
}
func (x *dfdaemonUploadSyncCachePiecesServer) Send(m *SyncCachePiecesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _DfdaemonUpload_DownloadCachePiece_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadCachePieceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfdaemonUploadServer).DownloadCachePiece(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dfdaemon.v2.DfdaemonUpload/DownloadCachePiece",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfdaemonUploadServer).DownloadCachePiece(ctx, req.(*DownloadCachePieceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DfdaemonUpload_DownloadPersistentCacheTask_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DownloadPersistentCacheTaskRequest)
if err := stream.RecvMsg(m); err != nil {
@ -647,6 +869,18 @@ var DfdaemonUpload_ServiceDesc = grpc.ServiceDesc{
MethodName: "DownloadPiece",
Handler: _DfdaemonUpload_DownloadPiece_Handler,
},
{
MethodName: "StatCacheTask",
Handler: _DfdaemonUpload_StatCacheTask_Handler,
},
{
MethodName: "DeleteCacheTask",
Handler: _DfdaemonUpload_DeleteCacheTask_Handler,
},
{
MethodName: "DownloadCachePiece",
Handler: _DfdaemonUpload_DownloadCachePiece_Handler,
},
{
MethodName: "UpdatePersistentCacheTask",
Handler: _DfdaemonUpload_UpdatePersistentCacheTask_Handler,
@ -679,6 +913,16 @@ var DfdaemonUpload_ServiceDesc = grpc.ServiceDesc{
Handler: _DfdaemonUpload_SyncPieces_Handler,
ServerStreams: true,
},
{
StreamName: "DownloadCacheTask",
Handler: _DfdaemonUpload_DownloadCacheTask_Handler,
ServerStreams: true,
},
{
StreamName: "SyncCachePieces",
Handler: _DfdaemonUpload_SyncCachePieces_Handler,
ServerStreams: true,
},
{
StreamName: "DownloadPersistentCacheTask",
Handler: _DfdaemonUpload_DownloadPersistentCacheTask_Handler,
@ -712,6 +956,12 @@ type DfdaemonDownloadClient interface {
DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// DeleteHost releases host in scheduler.
DeleteHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
// DownloadCacheTask downloads cache task from p2p network.
DownloadCacheTask(ctx context.Context, in *DownloadCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonDownload_DownloadCacheTaskClient, error)
// StatCacheTask stats cache task information.
StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error)
// DeleteCacheTask deletes cache task from p2p network.
DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
DownloadPersistentCacheTask(ctx context.Context, in *DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonDownload_DownloadPersistentCacheTaskClient, error)
// UploadPersistentCacheTask uploads persistent cache task to p2p network.
@ -796,8 +1046,58 @@ func (c *dfdaemonDownloadClient) DeleteHost(ctx context.Context, in *emptypb.Emp
return out, nil
}
func (c *dfdaemonDownloadClient) DownloadCacheTask(ctx context.Context, in *DownloadCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonDownload_DownloadCacheTaskClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonDownload_ServiceDesc.Streams[1], "/dfdaemon.v2.DfdaemonDownload/DownloadCacheTask", opts...)
if err != nil {
return nil, err
}
x := &dfdaemonDownloadDownloadCacheTaskClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type DfdaemonDownload_DownloadCacheTaskClient interface {
Recv() (*DownloadCacheTaskResponse, error)
grpc.ClientStream
}
type dfdaemonDownloadDownloadCacheTaskClient struct {
grpc.ClientStream
}
func (x *dfdaemonDownloadDownloadCacheTaskClient) Recv() (*DownloadCacheTaskResponse, error) {
m := new(DownloadCacheTaskResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dfdaemonDownloadClient) StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) {
out := new(v2.CacheTask)
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonDownload/StatCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfdaemonDownloadClient) DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonDownload/DeleteCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfdaemonDownloadClient) DownloadPersistentCacheTask(ctx context.Context, in *DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (DfdaemonDownload_DownloadPersistentCacheTaskClient, error) {
stream, err := c.cc.NewStream(ctx, &DfdaemonDownload_ServiceDesc.Streams[1], "/dfdaemon.v2.DfdaemonDownload/DownloadPersistentCacheTask", opts...)
stream, err := c.cc.NewStream(ctx, &DfdaemonDownload_ServiceDesc.Streams[2], "/dfdaemon.v2.DfdaemonDownload/DownloadPersistentCacheTask", opts...)
if err != nil {
return nil, err
}
@ -860,6 +1160,12 @@ type DfdaemonDownloadServer interface {
DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error)
// DeleteHost releases host in scheduler.
DeleteHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
// DownloadCacheTask downloads cache task from p2p network.
DownloadCacheTask(*DownloadCacheTaskRequest, DfdaemonDownload_DownloadCacheTaskServer) error
// StatCacheTask stats cache task information.
StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error)
// DeleteCacheTask deletes cache task from p2p network.
DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error)
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
DownloadPersistentCacheTask(*DownloadPersistentCacheTaskRequest, DfdaemonDownload_DownloadPersistentCacheTaskServer) error
// UploadPersistentCacheTask uploads persistent cache task to p2p network.
@ -887,6 +1193,15 @@ func (UnimplementedDfdaemonDownloadServer) DeleteTask(context.Context, *DeleteTa
func (UnimplementedDfdaemonDownloadServer) DeleteHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteHost not implemented")
}
func (UnimplementedDfdaemonDownloadServer) DownloadCacheTask(*DownloadCacheTaskRequest, DfdaemonDownload_DownloadCacheTaskServer) error {
return status.Errorf(codes.Unimplemented, "method DownloadCacheTask not implemented")
}
func (UnimplementedDfdaemonDownloadServer) StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) {
return nil, status.Errorf(codes.Unimplemented, "method StatCacheTask not implemented")
}
func (UnimplementedDfdaemonDownloadServer) DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCacheTask not implemented")
}
func (UnimplementedDfdaemonDownloadServer) DownloadPersistentCacheTask(*DownloadPersistentCacheTaskRequest, DfdaemonDownload_DownloadPersistentCacheTaskServer) error {
return status.Errorf(codes.Unimplemented, "method DownloadPersistentCacheTask not implemented")
}
@ -1001,6 +1316,63 @@ func _DfdaemonDownload_DeleteHost_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _DfdaemonDownload_DownloadCacheTask_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DownloadCacheTaskRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DfdaemonDownloadServer).DownloadCacheTask(m, &dfdaemonDownloadDownloadCacheTaskServer{stream})
}
type DfdaemonDownload_DownloadCacheTaskServer interface {
Send(*DownloadCacheTaskResponse) error
grpc.ServerStream
}
type dfdaemonDownloadDownloadCacheTaskServer struct {
grpc.ServerStream
}
func (x *dfdaemonDownloadDownloadCacheTaskServer) Send(m *DownloadCacheTaskResponse) error {
return x.ServerStream.SendMsg(m)
}
func _DfdaemonDownload_StatCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfdaemonDownloadServer).StatCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dfdaemon.v2.DfdaemonDownload/StatCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfdaemonDownloadServer).StatCacheTask(ctx, req.(*StatCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DfdaemonDownload_DeleteCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfdaemonDownloadServer).DeleteCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dfdaemon.v2.DfdaemonDownload/DeleteCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfdaemonDownloadServer).DeleteCacheTask(ctx, req.(*DeleteCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DfdaemonDownload_DownloadPersistentCacheTask_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DownloadPersistentCacheTaskRequest)
if err := stream.RecvMsg(m); err != nil {
@ -1081,6 +1453,14 @@ var DfdaemonDownload_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteHost",
Handler: _DfdaemonDownload_DeleteHost_Handler,
},
{
MethodName: "StatCacheTask",
Handler: _DfdaemonDownload_StatCacheTask_Handler,
},
{
MethodName: "DeleteCacheTask",
Handler: _DfdaemonDownload_DeleteCacheTask_Handler,
},
{
MethodName: "UploadPersistentCacheTask",
Handler: _DfdaemonDownload_UploadPersistentCacheTask_Handler,
@ -1096,6 +1476,11 @@ var DfdaemonDownload_ServiceDesc = grpc.ServiceDesc{
Handler: _DfdaemonDownload_DownloadTask_Handler,
ServerStreams: true,
},
{
StreamName: "DownloadCacheTask",
Handler: _DfdaemonDownload_DownloadCacheTask_Handler,
ServerStreams: true,
},
{
StreamName: "DownloadPersistentCacheTask",
Handler: _DfdaemonDownload_DownloadPersistentCacheTask_Handler,

File diff suppressed because it is too large Load Diff

View File

@ -352,6 +352,8 @@ type PeerHost struct {
Location string `protobuf:"bytes,7,opt,name=location,proto3" json:"location,omitempty"`
// IDC where the peer host is located
Idc string `protobuf:"bytes,8,opt,name=idc,proto3" json:"idc,omitempty"`
// Port of proxy server.
ProxyPort int32 `protobuf:"varint,9,opt,name=proxy_port,json=proxyPort,proto3" json:"proxy_port,omitempty"`
}
func (x *PeerHost) Reset() {
@ -435,6 +437,13 @@ func (x *PeerHost) GetIdc() string {
return ""
}
func (x *PeerHost) GetProxyPort() int32 {
if x != nil {
return x.ProxyPort
}
return 0
}
// PieceResult represents request of ReportPieceResult.
type PieceResult struct {
state protoimpl.MessageState
@ -1247,6 +1256,8 @@ type AnnounceHostRequest struct {
SchedulerClusterId uint64 `protobuf:"varint,17,opt,name=scheduler_cluster_id,json=schedulerClusterId,proto3" json:"scheduler_cluster_id,omitempty"`
// Port of object storage server.
ObjectStoragePort int32 `protobuf:"varint,18,opt,name=object_storage_port,json=objectStoragePort,proto3" json:"object_storage_port,omitempty"`
// Port of proxy server.
ProxyPort int32 `protobuf:"varint,19,opt,name=proxy_port,json=proxyPort,proto3" json:"proxy_port,omitempty"`
}
func (x *AnnounceHostRequest) Reset() {
@ -1407,6 +1418,13 @@ func (x *AnnounceHostRequest) GetObjectStoragePort() int32 {
return 0
}
func (x *AnnounceHostRequest) GetProxyPort() int32 {
if x != nil {
return x.ProxyPort
}
return 0
}
// CPU Stat.
type CPU struct {
state protoimpl.MessageState
@ -2107,8 +2125,8 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{
0x02, 0x10, 0x01, 0x52, 0x07, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x30, 0x0a, 0x0a,
0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe3,
0x01, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69,
0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x90,
0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x27, 0x0a,
@ -2122,313 +2140,318 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x69, 0x64, 0x63, 0x22, 0xfd, 0x02, 0x0a, 0x0b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f,
0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69,
0x64, 0x12, 0x30, 0x0a, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50,
0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43,
0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6e,
0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x42, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x22, 0xb8, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63,
0x6b, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x5f,
0x70, 0x65, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68,
0x03, 0x69, 0x64, 0x63, 0x12, 0x2b, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x6f,
0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10,
0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x6f, 0x72,
0x74, 0x22, 0xfd, 0x02, 0x0a, 0x0b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73,
0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64, 0x12, 0x30,
0x0a, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x04, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d,
0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a,
0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x22, 0xb8, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x72,
0x63, 0x50, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x65, 0x65,
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x44,
0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x65, 0x65,
0x72, 0x12, 0x47, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70,
0x65, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x08, 0x6d, 0x61, 0x69, 0x6e,
0x50, 0x65, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74,
0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x0e, 0x63,
0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
0x3e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74,
0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x1a,
0x6e, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x02, 0x69,
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01,
0x52, 0x02, 0x69, 0x70, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff,
0x03, 0x28, 0x80, 0x08, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a,
0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x42,
0x0e, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22,
0xcf, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20,
0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72,
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x05, 0x73, 0x72, 0x63,
0x49, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x69, 0x64, 0x63, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x12, 0x37, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x22, 0x0b, 0x28,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61,
0x66, 0x66, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x66,
0x66, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65,
0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, 0x10,
0xfa, 0x42, 0x0d, 0x1a, 0x0b, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x73, 0x22, 0xaf, 0x02, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73,
0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x75,
0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x88,
0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, 0x08, 0x75, 0x72,
0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa,
0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61,
0x12, 0x30, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x48, 0x6f,
0x73, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa,
0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x64,
0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x0c,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52,
0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x6e, 0x0a, 0x08,
0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69,
0x70, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80,
0x08, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x42, 0x0e, 0x0a, 0x0c,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xcf, 0x03, 0x0a,
0x0a, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74,
0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a,
0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1e, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x05, 0x73, 0x72, 0x63, 0x49, 0x70, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x63, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08,
0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x37, 0x0a,
0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18,
0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x22, 0x0b, 0x28, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04,
0x63, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x20,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x12, 0x3c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, 0x10, 0xfa, 0x42, 0x0d,
0x1a, 0x0b, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x52, 0x0f, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3e,
0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48,
0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0e,
0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xaf,
0x02, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73,
0x6b, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x2e, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28,
0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68,
0x12, 0x33, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04,
0x1a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x73,
0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28,
0x00, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10,
0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72,
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c,
0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72,
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65,
0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x88, 0x01, 0x01, 0xd0,
0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d,
0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a,
0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12,
0x40, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50,
0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61,
0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8c, 0x06, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f,
0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xfa, 0x42, 0x1f, 0x72, 0x1d, 0x52, 0x06, 0x6e,
0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x05, 0x73, 0x75, 0x70, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74,
0x72, 0x6f, 0x6e, 0x67, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73,
0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20,
0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42,
0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74,
0x12, 0x31, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff,
0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50,
0x6f, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12,
0x27, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69,
0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x72,
0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70,
0x75, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
0x6c, 0x65, 0x72, 0x2e, 0x43, 0x50, 0x55, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10,
0x01, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x33, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
0x65, 0x72, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
0x02, 0x10, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x69,
0x73, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x69,
0x73, 0x6b, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x75,
0x69, 0x6c, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x62,
0x75, 0x69, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01,
0x28, 0x04, 0x52, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75,
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x12, 0x20,
0x01, 0x28, 0x05, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80,
0x08, 0x40, 0x01, 0x52, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x23,
0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x68, 0x79,
0x73, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x65,
0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b,
0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72,
0x63, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f,
0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa,
0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a,
0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x22, 0x8d, 0x03, 0x0a, 0x08, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12,
0x22, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa,
0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75,
0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20,
0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54,
0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a,
0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18,
0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x0d,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x33, 0x0a,
0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28,
0x01, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x09,
0x70, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x68, 0x61, 0x73,
0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x18, 0x07, 0x20,
0x01, 0x28, 0x08, 0x52, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
0x65, 0x50, 0x65, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72,
0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65,
0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x02, 0x69, 0x64, 0x22, 0xbb, 0x06, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63,
0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x42, 0x22, 0xfa, 0x42, 0x1f, 0x72, 0x1d, 0x52, 0x06, 0x6e, 0x6f, 0x72, 0x6d,
0x61, 0x6c, 0x52, 0x05, 0x73, 0x75, 0x70, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, 0x72, 0x6f, 0x6e,
0x67, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a,
0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x70,
0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07,
0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a,
0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28,
0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x08, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x27, 0x0a, 0x0f,
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46,
0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
0x2e, 0x43, 0x50, 0x55, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03,
0x63, 0x70, 0x75, 0x12, 0x33, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x68, 0x65,
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x08, 0xfa,
0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
0x12, 0x2d, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42,
0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12,
0x30, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64,
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c,
0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52,
0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
0x72, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05,
0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x40, 0x01,
0x52, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50,
0x6f, 0x72, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff,
0xff, 0x03, 0x28, 0x80, 0x08, 0x40, 0x01, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x6f,
0x72, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f,
0x67, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x25, 0x0a, 0x0e, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61,
0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
0x12, 0x37, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63,
0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09,
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x42, 0x08, 0xfa,
0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x8d,
0x03, 0x0a, 0x08, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x75,
0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09,
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x26, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42,
0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x6e,
0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09,
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x12,
0x26, 0x0a, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42,
0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x72, 0x71, 0x18, 0x06,
0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, 0x66,
0x74, 0x69, 0x72, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12,
0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x73, 0x6f, 0x66, 0x74,
0x69, 0x72, 0x71, 0x12, 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01,
0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x52, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x75, 0x65,
0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x12,
0x2d, 0x0a, 0x0a, 0x67, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69,
0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09,
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12,
0x22, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa,
0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e,
0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20,
0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x52, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69,
0x72, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a,
0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e,
0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07,
0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, 0x71, 0x12, 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c,
0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a,
0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42,
0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75,
0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x67, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63,
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69,
0x63, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65,
0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x75, 0x73, 0x65,
0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55,
0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72,
0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xa8,
0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63,
0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b,
0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x18, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x44, 0x69,
0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64,
0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c,
0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12,
0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64,
0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x46, 0x72, 0x65,
0x65, 0x12, 0x47, 0x0a, 0x13, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64,
0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17,
0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x11, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55,
0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x05, 0x42,
0x75, 0x69, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x69, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x69, 0x74, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x32,
0xa8, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x49, 0x0a,
0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73,
0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65,
0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01,
0x12, 0x41, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54,
0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53,
0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x54, 0x61, 0x73, 0x6b, 0x12, 0x3a, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73,
0x6b, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65,
0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74,
0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e,
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76,
0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x72, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x64, 0x37,
0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76,
0x31, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x00, 0x00, 0x00, 0x52, 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69, 0x63, 0x65, 0x22, 0xb9,
0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12,
0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x04, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65,
0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72,
0x63, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f,
0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x01, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50,
0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x07, 0x4e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x75, 0x70, 0x6c, 0x6f,
0x61, 0x64, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x75,
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x69, 0x64, 0x63, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c,
0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65,
0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x6f, 0x64,
0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b,
0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69,
0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a,
0x13, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72,
0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12,
0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x52, 0x11, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50,
0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64,
0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x69, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x69, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x32, 0xa8, 0x04, 0x0a, 0x09,
0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67,
0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65,
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x69,
0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65,
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65,
0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x10,
0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12,
0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f,
0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54,
0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b,
0x12, 0x3a, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61,
0x72, 0x67, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c,
0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63,
0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73,
0x74, 0x12, 0x1b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4c, 0x65,
0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x63,
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -680,6 +680,17 @@ func (m *PeerHost) validate(all bool) error {
// no validation rules for Idc
if val := m.GetProxyPort(); val < 1024 || val >= 65535 {
err := PeerHostValidationError{
field: "ProxyPort",
reason: "value must be inside range [1024, 65535)",
}
if !all {
return err
}
errors = append(errors, err)
}
if len(errors) > 0 {
return PeerHostMultiError(errors)
}
@ -2505,6 +2516,21 @@ func (m *AnnounceHostRequest) validate(all bool) error {
}
if m.GetProxyPort() != 0 {
if val := m.GetProxyPort(); val < 1024 || val >= 65535 {
err := AnnounceHostRequestValidationError{
field: "ProxyPort",
reason: "value must be inside range [1024, 65535)",
}
if !all {
return err
}
errors = append(errors, err)
}
}
if len(errors) > 0 {
return AnnounceHostRequestMultiError(errors)
}

View File

@ -89,6 +89,8 @@ message PeerHost{
string location = 7;
// IDC where the peer host is located
string idc = 8;
// Port of proxy server.
int32 proxy_port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
}
// PieceResult represents request of ReportPieceResult.
@ -267,6 +269,8 @@ message AnnounceHostRequest{
uint64 scheduler_cluster_id = 17;
// Port of object storage server.
int32 object_storage_port = 18 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}];
// Port of proxy server.
int32 proxy_port = 19 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}];
}
// CPU Stat.

View File

@ -45,6 +45,26 @@ func (m *MockSchedulerClient) EXPECT() *MockSchedulerClientMockRecorder {
return m.recorder
}
// AnnounceCachePeer mocks base method.
func (m *MockSchedulerClient) AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_AnnounceCachePeerClient, error) {
m.ctrl.T.Helper()
varargs := []any{ctx}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AnnounceCachePeer", varargs...)
ret0, _ := ret[0].(scheduler.Scheduler_AnnounceCachePeerClient)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AnnounceCachePeer indicates an expected call of AnnounceCachePeer.
func (mr *MockSchedulerClientMockRecorder) AnnounceCachePeer(ctx any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnounceCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).AnnounceCachePeer), varargs...)
}
// AnnounceHost mocks base method.
func (m *MockSchedulerClient) AnnounceHost(ctx context.Context, in *scheduler.AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
@ -105,6 +125,46 @@ func (mr *MockSchedulerClientMockRecorder) AnnouncePersistentCachePeer(ctx any,
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePersistentCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).AnnouncePersistentCachePeer), varargs...)
}
// DeleteCachePeer mocks base method.
func (m *MockSchedulerClient) DeleteCachePeer(ctx context.Context, in *scheduler.DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DeleteCachePeer", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteCachePeer indicates an expected call of DeleteCachePeer.
func (mr *MockSchedulerClientMockRecorder) DeleteCachePeer(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).DeleteCachePeer), varargs...)
}
// DeleteCacheTask mocks base method.
func (m *MockSchedulerClient) DeleteCacheTask(ctx context.Context, in *scheduler.DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DeleteCacheTask", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteCacheTask indicates an expected call of DeleteCacheTask.
func (mr *MockSchedulerClientMockRecorder) DeleteCacheTask(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).DeleteCacheTask), varargs...)
}
// DeleteHost mocks base method.
func (m *MockSchedulerClient) DeleteHost(ctx context.Context, in *scheduler.DeleteHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
@ -225,6 +285,86 @@ func (mr *MockSchedulerClientMockRecorder) ListHosts(ctx, in any, opts ...any) *
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListHosts", reflect.TypeOf((*MockSchedulerClient)(nil).ListHosts), varargs...)
}
// PreheatImage mocks base method.
func (m *MockSchedulerClient) PreheatImage(ctx context.Context, in *scheduler.PreheatImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "PreheatImage", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PreheatImage indicates an expected call of PreheatImage.
func (mr *MockSchedulerClientMockRecorder) PreheatImage(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreheatImage", reflect.TypeOf((*MockSchedulerClient)(nil).PreheatImage), varargs...)
}
// StatCachePeer mocks base method.
func (m *MockSchedulerClient) StatCachePeer(ctx context.Context, in *scheduler.StatCachePeerRequest, opts ...grpc.CallOption) (*common.CachePeer, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "StatCachePeer", varargs...)
ret0, _ := ret[0].(*common.CachePeer)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatCachePeer indicates an expected call of StatCachePeer.
func (mr *MockSchedulerClientMockRecorder) StatCachePeer(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).StatCachePeer), varargs...)
}
// StatCacheTask mocks base method.
func (m *MockSchedulerClient) StatCacheTask(ctx context.Context, in *scheduler.StatCacheTaskRequest, opts ...grpc.CallOption) (*common.CacheTask, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "StatCacheTask", varargs...)
ret0, _ := ret[0].(*common.CacheTask)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatCacheTask indicates an expected call of StatCacheTask.
func (mr *MockSchedulerClientMockRecorder) StatCacheTask(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatCacheTask), varargs...)
}
// StatImage mocks base method.
func (m *MockSchedulerClient) StatImage(ctx context.Context, in *scheduler.StatImageRequest, opts ...grpc.CallOption) (*scheduler.StatImageResponse, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "StatImage", varargs...)
ret0, _ := ret[0].(*scheduler.StatImageResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatImage indicates an expected call of StatImage.
func (mr *MockSchedulerClientMockRecorder) StatImage(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatImage", reflect.TypeOf((*MockSchedulerClient)(nil).StatImage), varargs...)
}
// StatPeer mocks base method.
func (m *MockSchedulerClient) StatPeer(ctx context.Context, in *scheduler.StatPeerRequest, opts ...grpc.CallOption) (*common.Peer, error) {
m.ctrl.T.Helper()
@ -503,6 +643,144 @@ func (mr *MockScheduler_AnnouncePeerClientMockRecorder) Trailer() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_AnnouncePeerClient)(nil).Trailer))
}
// MockScheduler_AnnounceCachePeerClient is a mock of Scheduler_AnnounceCachePeerClient interface.
type MockScheduler_AnnounceCachePeerClient struct {
ctrl *gomock.Controller
recorder *MockScheduler_AnnounceCachePeerClientMockRecorder
isgomock struct{}
}
// MockScheduler_AnnounceCachePeerClientMockRecorder is the mock recorder for MockScheduler_AnnounceCachePeerClient.
type MockScheduler_AnnounceCachePeerClientMockRecorder struct {
mock *MockScheduler_AnnounceCachePeerClient
}
// NewMockScheduler_AnnounceCachePeerClient creates a new mock instance.
func NewMockScheduler_AnnounceCachePeerClient(ctrl *gomock.Controller) *MockScheduler_AnnounceCachePeerClient {
mock := &MockScheduler_AnnounceCachePeerClient{ctrl: ctrl}
mock.recorder = &MockScheduler_AnnounceCachePeerClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockScheduler_AnnounceCachePeerClient) EXPECT() *MockScheduler_AnnounceCachePeerClientMockRecorder {
return m.recorder
}
// CloseSend mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) CloseSend() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseSend")
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) CloseSend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).CloseSend))
}
// Context mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Context))
}
// Header mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) Header() (metadata.MD, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Header indicates an expected call of Header.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Header() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Header))
}
// Recv mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) Recv() (*scheduler.AnnounceCachePeerResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*scheduler.AnnounceCachePeerResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Recv))
}
// RecvMsg mocks base method.
func (m_2 *MockScheduler_AnnounceCachePeerClient) RecvMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) RecvMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).RecvMsg), m)
}
// Send mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) Send(arg0 *scheduler.AnnounceCachePeerRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Send(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Send), arg0)
}
// SendMsg mocks base method.
func (m_2 *MockScheduler_AnnounceCachePeerClient) SendMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) SendMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).SendMsg), m)
}
// Trailer mocks base method.
func (m *MockScheduler_AnnounceCachePeerClient) Trailer() metadata.MD {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trailer")
ret0, _ := ret[0].(metadata.MD)
return ret0
}
// Trailer indicates an expected call of Trailer.
func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Trailer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Trailer))
}
// MockScheduler_AnnouncePersistentCachePeerClient is a mock of Scheduler_AnnouncePersistentCachePeerClient interface.
type MockScheduler_AnnouncePersistentCachePeerClient struct {
ctrl *gomock.Controller
@ -665,6 +943,20 @@ func (m *MockSchedulerServer) EXPECT() *MockSchedulerServerMockRecorder {
return m.recorder
}
// AnnounceCachePeer mocks base method.
func (m *MockSchedulerServer) AnnounceCachePeer(arg0 scheduler.Scheduler_AnnounceCachePeerServer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AnnounceCachePeer", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// AnnounceCachePeer indicates an expected call of AnnounceCachePeer.
func (mr *MockSchedulerServerMockRecorder) AnnounceCachePeer(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnounceCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).AnnounceCachePeer), arg0)
}
// AnnounceHost mocks base method.
func (m *MockSchedulerServer) AnnounceHost(arg0 context.Context, arg1 *scheduler.AnnounceHostRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
@ -708,6 +1000,36 @@ func (mr *MockSchedulerServerMockRecorder) AnnouncePersistentCachePeer(arg0 any)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePersistentCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).AnnouncePersistentCachePeer), arg0)
}
// DeleteCachePeer mocks base method.
func (m *MockSchedulerServer) DeleteCachePeer(arg0 context.Context, arg1 *scheduler.DeleteCachePeerRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteCachePeer", arg0, arg1)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteCachePeer indicates an expected call of DeleteCachePeer.
func (mr *MockSchedulerServerMockRecorder) DeleteCachePeer(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).DeleteCachePeer), arg0, arg1)
}
// DeleteCacheTask mocks base method.
func (m *MockSchedulerServer) DeleteCacheTask(arg0 context.Context, arg1 *scheduler.DeleteCacheTaskRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteCacheTask", arg0, arg1)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteCacheTask indicates an expected call of DeleteCacheTask.
func (mr *MockSchedulerServerMockRecorder) DeleteCacheTask(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).DeleteCacheTask), arg0, arg1)
}
// DeleteHost mocks base method.
func (m *MockSchedulerServer) DeleteHost(arg0 context.Context, arg1 *scheduler.DeleteHostRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
@ -798,6 +1120,66 @@ func (mr *MockSchedulerServerMockRecorder) ListHosts(arg0, arg1 any) *gomock.Cal
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListHosts", reflect.TypeOf((*MockSchedulerServer)(nil).ListHosts), arg0, arg1)
}
// PreheatImage mocks base method.
func (m *MockSchedulerServer) PreheatImage(arg0 context.Context, arg1 *scheduler.PreheatImageRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PreheatImage", arg0, arg1)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PreheatImage indicates an expected call of PreheatImage.
func (mr *MockSchedulerServerMockRecorder) PreheatImage(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreheatImage", reflect.TypeOf((*MockSchedulerServer)(nil).PreheatImage), arg0, arg1)
}
// StatCachePeer mocks base method.
func (m *MockSchedulerServer) StatCachePeer(arg0 context.Context, arg1 *scheduler.StatCachePeerRequest) (*common.CachePeer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StatCachePeer", arg0, arg1)
ret0, _ := ret[0].(*common.CachePeer)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatCachePeer indicates an expected call of StatCachePeer.
func (mr *MockSchedulerServerMockRecorder) StatCachePeer(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).StatCachePeer), arg0, arg1)
}
// StatCacheTask mocks base method.
func (m *MockSchedulerServer) StatCacheTask(arg0 context.Context, arg1 *scheduler.StatCacheTaskRequest) (*common.CacheTask, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StatCacheTask", arg0, arg1)
ret0, _ := ret[0].(*common.CacheTask)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatCacheTask indicates an expected call of StatCacheTask.
func (mr *MockSchedulerServerMockRecorder) StatCacheTask(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatCacheTask), arg0, arg1)
}
// StatImage mocks base method.
func (m *MockSchedulerServer) StatImage(arg0 context.Context, arg1 *scheduler.StatImageRequest) (*scheduler.StatImageResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StatImage", arg0, arg1)
ret0, _ := ret[0].(*scheduler.StatImageResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StatImage indicates an expected call of StatImage.
func (mr *MockSchedulerServerMockRecorder) StatImage(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatImage", reflect.TypeOf((*MockSchedulerServer)(nil).StatImage), arg0, arg1)
}
// StatPeer mocks base method.
func (m *MockSchedulerServer) StatPeer(arg0 context.Context, arg1 *scheduler.StatPeerRequest) (*common.Peer, error) {
m.ctrl.T.Helper()
@ -1074,6 +1456,141 @@ func (mr *MockScheduler_AnnouncePeerServerMockRecorder) SetTrailer(arg0 any) *go
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_AnnouncePeerServer)(nil).SetTrailer), arg0)
}
// MockScheduler_AnnounceCachePeerServer is a mock of Scheduler_AnnounceCachePeerServer interface.
type MockScheduler_AnnounceCachePeerServer struct {
ctrl *gomock.Controller
recorder *MockScheduler_AnnounceCachePeerServerMockRecorder
isgomock struct{}
}
// MockScheduler_AnnounceCachePeerServerMockRecorder is the mock recorder for MockScheduler_AnnounceCachePeerServer.
type MockScheduler_AnnounceCachePeerServerMockRecorder struct {
mock *MockScheduler_AnnounceCachePeerServer
}
// NewMockScheduler_AnnounceCachePeerServer creates a new mock instance.
func NewMockScheduler_AnnounceCachePeerServer(ctrl *gomock.Controller) *MockScheduler_AnnounceCachePeerServer {
mock := &MockScheduler_AnnounceCachePeerServer{ctrl: ctrl}
mock.recorder = &MockScheduler_AnnounceCachePeerServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockScheduler_AnnounceCachePeerServer) EXPECT() *MockScheduler_AnnounceCachePeerServerMockRecorder {
return m.recorder
}
// Context mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Context))
}
// Recv mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) Recv() (*scheduler.AnnounceCachePeerRequest, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*scheduler.AnnounceCachePeerRequest)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Recv))
}
// RecvMsg mocks base method.
func (m_2 *MockScheduler_AnnounceCachePeerServer) RecvMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) RecvMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).RecvMsg), m)
}
// Send mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) Send(arg0 *scheduler.AnnounceCachePeerResponse) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Send(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Send), arg0)
}
// SendHeader mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) SendHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendHeader indicates an expected call of SendHeader.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SendHeader(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SendHeader), arg0)
}
// SendMsg mocks base method.
func (m_2 *MockScheduler_AnnounceCachePeerServer) SendMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SendMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SendMsg), m)
}
// SetHeader mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) SetHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetHeader indicates an expected call of SetHeader.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SetHeader(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SetHeader), arg0)
}
// SetTrailer mocks base method.
func (m *MockScheduler_AnnounceCachePeerServer) SetTrailer(arg0 metadata.MD) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetTrailer", arg0)
}
// SetTrailer indicates an expected call of SetTrailer.
func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SetTrailer(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SetTrailer), arg0)
}
// MockScheduler_AnnouncePersistentCachePeerServer is a mock of Scheduler_AnnouncePersistentCachePeerServer interface.
type MockScheduler_AnnouncePersistentCachePeerServer struct {
ctrl *gomock.Controller

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -224,6 +224,198 @@ message DeleteHostRequest{
string host_id = 1 [(validate.rules).string.min_len = 1];
}
// RegisterCachePeerRequest represents cache peer registered request of AnnounceCachePeerRequest.
message RegisterCachePeerRequest {
// 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]+)$", 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.
optional common.v2.Range range = 3;
// Task type.
common.v2.TaskType type = 4 [(validate.rules).enum.defined_only = true];
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Peer priority.
common.v2.Priority priority = 7 [(validate.rules).enum.defined_only = true];
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 8;
// Task request headers.
map<string, string> request_header = 9;
// Task piece length, the value needs to be greater than or equal to 4194304(4MiB).
optional uint64 piece_length = 10 [(validate.rules).uint64 = {gte: 4194304, ignore_empty: true}];
// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
// it will copy the file to the output path after the download is completed.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
optional string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object storage protocol information.
optional common.v2.ObjectStorage object_storage = 17;
// HDFS protocol information.
optional common.v2.HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// content_for_calculating_task_id is the content used to calculate the task id.
// If content_for_calculating_task_id is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
optional string content_for_calculating_task_id = 21;
// remote_ip represents the IP address of the client initiating the download request.
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 22 [(validate.rules).string = {ip: true, ignore_empty: true}];
}
// DownloadCachePeerStartedRequest represents cache peer download started request of AnnounceCachePeerRequest.
message DownloadCachePeerStartedRequest {
}
// DownloadCachePeerBackToSourceStartedRequest represents cache peer download back-to-source started request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceStartedRequest {
// The description of the back-to-source reason.
optional string description = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}
// RescheduleCachePeerRequest represents reschedule request of AnnounceCachePeerRequest.
message RescheduleCachePeerRequest {
// Candidate parent ids.
repeated common.v2.CachePeer candidate_parents = 1;
// The description of the reschedule reason.
optional string description = 2 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}
// DownloadCachePeerFinishedRequest represents cache peer download finished request of AnnounceCachePeerRequest.
message DownloadCachePeerFinishedRequest {
// Total content length.
uint64 content_length = 1;
// Total piece count.
uint32 piece_count = 2;
}
// DownloadCachePeerBackToSourceFinishedRequest represents cache peer download back-to-source finished request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceFinishedRequest {
// Total content length.
uint64 content_length = 1;
// Total piece count.
uint32 piece_count = 2;
}
// DownloadCachePeerFailedRequest represents cache peer download failed request of AnnounceCachePeerRequest.
message DownloadCachePeerFailedRequest {
// The description of the download failed.
optional string description = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}
// DownloadCachePeerBackToSourceFailedRequest represents cache peer download back-to-source failed request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceFailedRequest {
// The description of the download back-to-source failed.
optional string description = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}
// AnnounceCachePeerRequest represents request of AnnounceCachePeer.
message AnnounceCachePeerRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Peer id.
string peer_id = 3 [(validate.rules).string.min_len = 1];
oneof request {
option (validate.required) = true;
RegisterCachePeerRequest register_cache_peer_request = 4;
DownloadCachePeerStartedRequest download_cache_peer_started_request = 5;
DownloadCachePeerBackToSourceStartedRequest download_cache_peer_back_to_source_started_request = 6;
RescheduleCachePeerRequest reschedule_cache_peer_request = 7;
DownloadCachePeerFinishedRequest download_cache_peer_finished_request = 8;
DownloadCachePeerBackToSourceFinishedRequest download_cache_peer_back_to_source_finished_request = 9;
DownloadCachePeerFailedRequest download_cache_peer_failed_request = 10;
DownloadCachePeerBackToSourceFailedRequest download_cache_peer_back_to_source_failed_request = 11;
DownloadPieceFinishedRequest download_piece_finished_request = 12;
DownloadPieceBackToSourceFinishedRequest download_piece_back_to_source_finished_request = 13;
DownloadPieceFailedRequest download_piece_failed_request = 14;
DownloadPieceBackToSourceFailedRequest download_piece_back_to_source_failed_request = 15;
}
}
// EmptyCacheTaskResponse represents empty cache task response of AnnounceCachePeerResponse.
message EmptyCacheTaskResponse {
}
// NormalCacheTaskResponse represents normal cache task response of AnnounceCachePeerResponse.
message NormalCacheTaskResponse {
// Candidate parents.
repeated common.v2.CachePeer candidate_parents = 1 [(validate.rules).repeated.min_items = 1];
}
// AnnounceCachePeerResponse represents response of AnnounceCachePeer.
message AnnounceCachePeerResponse {
oneof response {
option (validate.required) = true;
EmptyCacheTaskResponse empty_cache_task_response = 1;
NormalCacheTaskResponse normal_cache_task_response = 2;
NeedBackToSourceResponse need_back_to_source_response = 3;
}
}
// StatCachePeerRequest represents request of StatCachePeer.
message StatCachePeerRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Peer id.
string peer_id = 3 [(validate.rules).string.min_len = 1];
}
// DeleteCachePeerRequest represents request of DeleteCachePeer.
message DeleteCachePeerRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
// Peer id.
string peer_id = 3 [(validate.rules).string.min_len = 1];
}
// StatCacheTaskRequest represents request of StatCacheTask.
message StatCacheTaskRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
}
// DeleteCacheTaskRequest represents request of DeleteCacheTask.
message DeleteCacheTaskRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Task id.
string task_id = 2 [(validate.rules).string.min_len = 1];
}
// RegisterPersistentCachePeerRequest represents persistent cache peer registered request of AnnouncePersistentCachePeerRequest.
message RegisterPersistentCachePeerRequest {
// Persistent represents whether the persistent cache task is persistent.
@ -391,6 +583,145 @@ message DeletePersistentCacheTaskRequest {
string task_id = 2 [(validate.rules).string.min_len = 1];
}
// PreheatImageRequest represents request of PreheatImage.
message PreheatImageRequest {
// URL is the image manifest url for preheating.
string url = 1 [(validate.rules).string.uri = true];
// Piece Length is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
optional uint64 piece_length = 2 [(validate.rules).uint64 = {gte: 4194304, lte: 67108864, ignore_empty: true}];
// Tag is the tag for preheating.
optional string tag = 3;
// Application is the application string for preheating.
optional string application = 4;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 5;
// Header is the http headers for authentication.
map<string, string> header = 6;
// Username is the username for authentication.
optional string username = 7;
// Password is the password for authentication.
optional string password = 8;
// Platform is the platform for preheating, such as linux/amd64, linux/arm64, etc.
optional string platform = 9;
// Scope is the scope for preheating, it can be one of the following values:
// - single_seed_peer: preheat from a single seed peer.
// - all_seed_peers: preheat from all seed peers.
// - all_peers: preheat from all available peers.
string scope = 10 [(validate.rules).string.pattern = "^(single_seed_peer|all_seed_peers|all_peers)$"];
// IPs is a list of specific peer IPs for preheating.
// This field has the highest priority: if provided, both 'Count' and 'Percentage' will be ignored.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
repeated string ips = 11;
// Percentage is the percentage of available peers to preheat.
// This field has the lowest priority and is only used if both 'IPs' and 'Count' are not provided.
// It must be a value between 1 and 100 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
optional uint32 percentage = 12 [(validate.rules).uint32 = {gte: 1, lte: 100, ignore_empty: true}];
// Count is the desired number of peers to preheat.
// This field is used only when 'IPs' is not specified. It has priority over 'Percentage'.
// It must be a value between 1 and 200 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
optional uint32 count = 13 [(validate.rules).uint32 = {gte: 1, lte: 200, ignore_empty: true}];
// ConcurrentTaskCount specifies the maximum number of tasks (e.g., image layers) to preheat concurrently.
// For example, if preheating 100 layers with ConcurrentTaskCount set to 10, up to 10 layers are processed simultaneously.
// If ConcurrentPeerCount is 10 for 1000 peers, each layer is preheated by 10 peers concurrently.
// Default is 8, maximum is 100.
optional int64 concurrent_task_count = 14 [(validate.rules).int64 = {gte: 1, lte: 100, ignore_empty: true}];
// ConcurrentPeerCount specifies the maximum number of peers to preheat concurrently for a single task (e.g., an image layer).
// For example, if preheating a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
optional int64 concurrent_peer_count = 15 [(validate.rules).int64 = {gte: 1, lte: 1000, ignore_empty: true}];
// Timeout is the timeout for preheating, default is 30 minutes.
optional google.protobuf.Duration timeout = 16;
// Preheat priority.
common.v2.Priority priority = 17 [(validate.rules).enum.defined_only = true];
// certificate_chain is the client certs with DER format for the backend client.
repeated bytes certificate_chain = 18;
// insecure_skip_verify indicates whether to skip TLS verification.
bool insecure_skip_verify = 19;
}
// StatImageRequest represents request of StatImage.
message StatImageRequest {
// URL is the image manifest url for preheating.
string url = 1 [(validate.rules).string.uri = true];
// Piece Length is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
optional uint64 piece_length = 2 [(validate.rules).uint64 = {gte: 4194304, lte: 67108864, ignore_empty: true}];
// Tag is the tag for preheating.
optional string tag = 3;
// Application is the application string for preheating.
optional string application = 4;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 5;
// Header is the http headers for authentication.
map<string, string> header = 6;
// Username is the username for authentication.
optional string username = 7;
// Password is the password for authentication.
optional string password = 8;
// Platform is the platform for preheating, such as linux/amd64, linux/arm64, etc.
optional string platform = 9;
// ConcurrentLayerCount specifies the maximum number of layers to get concurrently.
// For example, if stat 100 layers with ConcurrentLayerCount set to 10, up to 10 layers are processed simultaneously.
// If ConcurrentPeerCount is 10 for 1000 peers, each layer is stated by 10 peers concurrently.
// Default is 8, maximum is 100.
optional int64 concurrent_layer_count = 10 [(validate.rules).int64 = {gte: 1, lte: 100, ignore_empty: true}];
// ConcurrentPeerCount specifies the maximum number of peers stat concurrently for a single task (e.g., an image layer).
// For example, if stat a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
optional int64 concurrent_peer_count = 11 [(validate.rules).int64 = {gte: 1, lte: 1000, ignore_empty: true}];
// Timeout is the timeout for preheating, default is 30 minutes.
optional google.protobuf.Duration timeout = 12;
// certificate_chain is the client certs with DER format for the backend client.
repeated bytes certificate_chain = 13;
// insecure_skip_verify indicates whether to skip TLS verification.
bool insecure_skip_verify = 14;
}
// StatImageResponse represents response of StatImage.
message StatImageResponse {
// Image is the image information.
Image image = 1;
// Peers is the peers that have downloaded the image.
repeated PeerImage peers = 2;
}
// PeerImage represents a peer in the get image job.
message PeerImage {
// IP is the IP address of the peer.
string ip = 1 [(validate.rules).string.ip = true];
// Hostname is the hostname of the peer.
string hostname = 2 [(validate.rules).string.min_len = 1];
// CachedLayers is the list of layers that the peer has downloaded.
repeated Layer cached_layers = 3;
}
// Image represents the image information.
message Image {
// Layers is the list of layers of the image.
repeated Layer layers = 1;
}
// Layer represents a layer of the image.
message Layer {
// URL is the URL of the layer.
string url = 1 [(validate.rules).string.uri = true];
}
// Scheduler RPC Service.
service Scheduler {
// AnnouncePeer announces peer to scheduler.
@ -417,6 +748,21 @@ service Scheduler {
// DeleteHost releases host in scheduler.
rpc DeleteHost(DeleteHostRequest)returns(google.protobuf.Empty);
// AnnounceCachePeer announces cache peer to scheduler.
rpc AnnounceCachePeer(stream AnnounceCachePeerRequest) returns(stream AnnounceCachePeerResponse);
// Checks information of cache peer.
rpc StatCachePeer(StatCachePeerRequest)returns(common.v2.CachePeer);
// DeleteCachePeer releases cache peer in scheduler.
rpc DeleteCachePeer(DeleteCachePeerRequest)returns(google.protobuf.Empty);
// Checks information of cache task.
rpc StatCacheTask(StatCacheTaskRequest)returns(common.v2.CacheTask);
// DeleteCacheTask releases cache task in scheduler.
rpc DeleteCacheTask(DeleteCacheTaskRequest)returns(google.protobuf.Empty);
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
rpc AnnouncePersistentCachePeer(stream AnnouncePersistentCachePeerRequest) returns(stream AnnouncePersistentCachePeerResponse);
@ -440,4 +786,23 @@ service Scheduler {
// DeletePersistentCacheTask releases persistent cache task in scheduler.
rpc DeletePersistentCacheTask(DeletePersistentCacheTaskRequest)returns(google.protobuf.Empty);
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
//
// This is a blocking call. The RPC will not return until the server has completed the
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
//
// After this call successfully returns, a scheduler on the server begins the actual
// preheating process, instructing peers to download the layers in the background.
//
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
// and the asynchronous download task has been scheduled.
rpc PreheatImage(PreheatImageRequest)returns(google.protobuf.Empty);
// StatImage provides detailed status for a container image's distribution in peers.
//
// This is a blocking call that first resolves the image manifest and then queries
// all peers to collect the image's download state across the network.
// The response includes both layer information and the status on each peer.
rpc StatImage(StatImageRequest)returns(StatImageResponse);
}

View File

@ -40,6 +40,16 @@ type SchedulerClient interface {
ListHosts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListHostsResponse, error)
// DeleteHost releases host in scheduler.
DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// AnnounceCachePeer announces cache peer to scheduler.
AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnounceCachePeerClient, error)
// Checks information of cache peer.
StatCachePeer(ctx context.Context, in *StatCachePeerRequest, opts ...grpc.CallOption) (*v2.CachePeer, error)
// DeleteCachePeer releases cache peer in scheduler.
DeleteCachePeer(ctx context.Context, in *DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Checks information of cache task.
StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error)
// DeleteCacheTask releases cache task in scheduler.
DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
AnnouncePersistentCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePersistentCachePeerClient, error)
// Checks information of persistent cache peer.
@ -56,6 +66,23 @@ type SchedulerClient interface {
StatPersistentCacheTask(ctx context.Context, in *StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*v2.PersistentCacheTask, error)
// DeletePersistentCacheTask releases persistent cache task in scheduler.
DeletePersistentCacheTask(ctx context.Context, in *DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
//
// This is a blocking call. The RPC will not return until the server has completed the
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
//
// After this call successfully returns, a scheduler on the server begins the actual
// preheating process, instructing peers to download the layers in the background.
//
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
// and the asynchronous download task has been scheduled.
PreheatImage(ctx context.Context, in *PreheatImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// StatImage provides detailed status for a container image's distribution in peers.
//
// This is a blocking call that first resolves the image manifest and then queries
// all peers to collect the image's download state across the network.
// The response includes both layer information and the status on each peer.
StatImage(ctx context.Context, in *StatImageRequest, opts ...grpc.CallOption) (*StatImageResponse, error)
}
type schedulerClient struct {
@ -160,8 +187,75 @@ func (c *schedulerClient) DeleteHost(ctx context.Context, in *DeleteHostRequest,
return out, nil
}
func (c *schedulerClient) AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnounceCachePeerClient, error) {
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1], "/scheduler.v2.Scheduler/AnnounceCachePeer", opts...)
if err != nil {
return nil, err
}
x := &schedulerAnnounceCachePeerClient{stream}
return x, nil
}
type Scheduler_AnnounceCachePeerClient interface {
Send(*AnnounceCachePeerRequest) error
Recv() (*AnnounceCachePeerResponse, error)
grpc.ClientStream
}
type schedulerAnnounceCachePeerClient struct {
grpc.ClientStream
}
func (x *schedulerAnnounceCachePeerClient) Send(m *AnnounceCachePeerRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *schedulerAnnounceCachePeerClient) Recv() (*AnnounceCachePeerResponse, error) {
m := new(AnnounceCachePeerResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *schedulerClient) StatCachePeer(ctx context.Context, in *StatCachePeerRequest, opts ...grpc.CallOption) (*v2.CachePeer, error) {
out := new(v2.CachePeer)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatCachePeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerClient) DeleteCachePeer(ctx context.Context, in *DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteCachePeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerClient) StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) {
out := new(v2.CacheTask)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerClient) DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteCacheTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerClient) AnnouncePersistentCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePersistentCachePeerClient, error) {
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1], "/scheduler.v2.Scheduler/AnnouncePersistentCachePeer", opts...)
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2], "/scheduler.v2.Scheduler/AnnouncePersistentCachePeer", opts...)
if err != nil {
return nil, err
}
@ -254,6 +348,24 @@ func (c *schedulerClient) DeletePersistentCacheTask(ctx context.Context, in *Del
return out, nil
}
func (c *schedulerClient) PreheatImage(ctx context.Context, in *PreheatImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/PreheatImage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerClient) StatImage(ctx context.Context, in *StatImageRequest, opts ...grpc.CallOption) (*StatImageResponse, error) {
out := new(StatImageResponse)
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatImage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SchedulerServer is the server API for Scheduler service.
// All implementations should embed UnimplementedSchedulerServer
// for forward compatibility
@ -274,6 +386,16 @@ type SchedulerServer interface {
ListHosts(context.Context, *emptypb.Empty) (*ListHostsResponse, error)
// DeleteHost releases host in scheduler.
DeleteHost(context.Context, *DeleteHostRequest) (*emptypb.Empty, error)
// AnnounceCachePeer announces cache peer to scheduler.
AnnounceCachePeer(Scheduler_AnnounceCachePeerServer) error
// Checks information of cache peer.
StatCachePeer(context.Context, *StatCachePeerRequest) (*v2.CachePeer, error)
// DeleteCachePeer releases cache peer in scheduler.
DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error)
// Checks information of cache task.
StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error)
// DeleteCacheTask releases cache task in scheduler.
DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error)
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
AnnouncePersistentCachePeer(Scheduler_AnnouncePersistentCachePeerServer) error
// Checks information of persistent cache peer.
@ -290,6 +412,23 @@ type SchedulerServer interface {
StatPersistentCacheTask(context.Context, *StatPersistentCacheTaskRequest) (*v2.PersistentCacheTask, error)
// DeletePersistentCacheTask releases persistent cache task in scheduler.
DeletePersistentCacheTask(context.Context, *DeletePersistentCacheTaskRequest) (*emptypb.Empty, error)
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
//
// This is a blocking call. The RPC will not return until the server has completed the
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
//
// After this call successfully returns, a scheduler on the server begins the actual
// preheating process, instructing peers to download the layers in the background.
//
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
// and the asynchronous download task has been scheduled.
PreheatImage(context.Context, *PreheatImageRequest) (*emptypb.Empty, error)
// StatImage provides detailed status for a container image's distribution in peers.
//
// This is a blocking call that first resolves the image manifest and then queries
// all peers to collect the image's download state across the network.
// The response includes both layer information and the status on each peer.
StatImage(context.Context, *StatImageRequest) (*StatImageResponse, error)
}
// UnimplementedSchedulerServer should be embedded to have forward compatible implementations.
@ -320,6 +459,21 @@ func (UnimplementedSchedulerServer) ListHosts(context.Context, *emptypb.Empty) (
func (UnimplementedSchedulerServer) DeleteHost(context.Context, *DeleteHostRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteHost not implemented")
}
func (UnimplementedSchedulerServer) AnnounceCachePeer(Scheduler_AnnounceCachePeerServer) error {
return status.Errorf(codes.Unimplemented, "method AnnounceCachePeer not implemented")
}
func (UnimplementedSchedulerServer) StatCachePeer(context.Context, *StatCachePeerRequest) (*v2.CachePeer, error) {
return nil, status.Errorf(codes.Unimplemented, "method StatCachePeer not implemented")
}
func (UnimplementedSchedulerServer) DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCachePeer not implemented")
}
func (UnimplementedSchedulerServer) StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) {
return nil, status.Errorf(codes.Unimplemented, "method StatCacheTask not implemented")
}
func (UnimplementedSchedulerServer) DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCacheTask not implemented")
}
func (UnimplementedSchedulerServer) AnnouncePersistentCachePeer(Scheduler_AnnouncePersistentCachePeerServer) error {
return status.Errorf(codes.Unimplemented, "method AnnouncePersistentCachePeer not implemented")
}
@ -344,6 +498,12 @@ func (UnimplementedSchedulerServer) StatPersistentCacheTask(context.Context, *St
func (UnimplementedSchedulerServer) DeletePersistentCacheTask(context.Context, *DeletePersistentCacheTaskRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePersistentCacheTask not implemented")
}
func (UnimplementedSchedulerServer) PreheatImage(context.Context, *PreheatImageRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PreheatImage not implemented")
}
func (UnimplementedSchedulerServer) StatImage(context.Context, *StatImageRequest) (*StatImageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StatImage not implemented")
}
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SchedulerServer will
@ -508,6 +668,104 @@ func _Scheduler_DeleteHost_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
func _Scheduler_AnnounceCachePeer_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SchedulerServer).AnnounceCachePeer(&schedulerAnnounceCachePeerServer{stream})
}
type Scheduler_AnnounceCachePeerServer interface {
Send(*AnnounceCachePeerResponse) error
Recv() (*AnnounceCachePeerRequest, error)
grpc.ServerStream
}
type schedulerAnnounceCachePeerServer struct {
grpc.ServerStream
}
func (x *schedulerAnnounceCachePeerServer) Send(m *AnnounceCachePeerResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *schedulerAnnounceCachePeerServer) Recv() (*AnnounceCachePeerRequest, error) {
m := new(AnnounceCachePeerRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Scheduler_StatCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatCachePeerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).StatCachePeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/StatCachePeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).StatCachePeer(ctx, req.(*StatCachePeerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Scheduler_DeleteCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCachePeerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).DeleteCachePeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/DeleteCachePeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).DeleteCachePeer(ctx, req.(*DeleteCachePeerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Scheduler_StatCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).StatCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/StatCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).StatCacheTask(ctx, req.(*StatCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Scheduler_DeleteCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCacheTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).DeleteCacheTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/DeleteCacheTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).DeleteCacheTask(ctx, req.(*DeleteCacheTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Scheduler_AnnouncePersistentCachePeer_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SchedulerServer).AnnouncePersistentCachePeer(&schedulerAnnouncePersistentCachePeerServer{stream})
}
@ -660,6 +918,42 @@ func _Scheduler_DeletePersistentCacheTask_Handler(srv interface{}, ctx context.C
return interceptor(ctx, in, info, handler)
}
func _Scheduler_PreheatImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PreheatImageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).PreheatImage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/PreheatImage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).PreheatImage(ctx, req.(*PreheatImageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Scheduler_StatImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatImageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServer).StatImage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.v2.Scheduler/StatImage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServer).StatImage(ctx, req.(*StatImageRequest))
}
return interceptor(ctx, in, info, handler)
}
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -695,6 +989,22 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteHost",
Handler: _Scheduler_DeleteHost_Handler,
},
{
MethodName: "StatCachePeer",
Handler: _Scheduler_StatCachePeer_Handler,
},
{
MethodName: "DeleteCachePeer",
Handler: _Scheduler_DeleteCachePeer_Handler,
},
{
MethodName: "StatCacheTask",
Handler: _Scheduler_StatCacheTask_Handler,
},
{
MethodName: "DeleteCacheTask",
Handler: _Scheduler_DeleteCacheTask_Handler,
},
{
MethodName: "StatPersistentCachePeer",
Handler: _Scheduler_StatPersistentCachePeer_Handler,
@ -723,6 +1033,14 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeletePersistentCacheTask",
Handler: _Scheduler_DeletePersistentCacheTask_Handler,
},
{
MethodName: "PreheatImage",
Handler: _Scheduler_PreheatImage_Handler,
},
{
MethodName: "StatImage",
Handler: _Scheduler_StatImage_Handler,
},
},
Streams: []grpc.StreamDesc{
{
@ -731,6 +1049,12 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "AnnounceCachePeer",
Handler: _Scheduler_AnnounceCachePeer_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "AnnouncePersistentCachePeer",
Handler: _Scheduler_AnnouncePersistentCachePeer_Handler,

View File

@ -42,7 +42,7 @@ enum TaskType {
// local peer(local cache). When the standard task is never downloaded in the
// P2P cluster, dfdaemon will download the task from the source. When the standard
// task is downloaded in the P2P cluster, dfdaemon will download the task from
// the remote peer or local peer(local cache).
// the remote peer or local peer(local cache), where peers use disk storage to store tasks.
STANDARD = 0;
// PERSISTENT is persistent type of task, it can import file and export file in P2P cluster.
@ -56,6 +56,13 @@ enum TaskType {
// the task in the peer's disk and copy multiple replicas to remote peers to prevent data loss.
// When the expiration time is reached, task will be deleted in the P2P cluster.
PERSISTENT_CACHE = 2;
// CACHE is cache type of task, it can download from source, remote peer and
// local peer(local cache). When the cache task is never downloaded in the
// P2P cluster, dfdaemon will download the cache task from the source. When the cache
// task is downloaded in the P2P cluster, dfdaemon will download the cache task from
// the remote peer or local peer(local cache), where peers use memory storage to store cache tasks.
CACHE = 3;
}
// TrafficType represents type of traffic.
@ -132,6 +139,32 @@ message Peer {
google.protobuf.Timestamp updated_at = 11;
}
// CachePeer metadata.
message CachePeer {
// Peer id.
string id = 1;
// Range is url range of request.
optional Range range = 2;
// Peer priority.
Priority priority = 3;
// Pieces of peer.
repeated Piece pieces = 4;
// Peer downloads costs time.
google.protobuf.Duration cost = 5;
// Peer state.
string state = 6;
// Cache Task info.
CacheTask task = 7;
// Host info.
Host host = 8;
// NeedBackToSource needs downloaded from source.
bool need_back_to_source = 9;
// Peer create time.
google.protobuf.Timestamp created_at = 10;
// Peer update time.
google.protobuf.Timestamp updated_at = 11;
}
// PersistentCachePeer metadata.
message PersistentCachePeer {
// Peer id.
@ -202,6 +235,53 @@ message Task {
google.protobuf.Timestamp updated_at = 17;
}
// CacheTask metadata.
message CacheTask {
// Task id.
string id = 1;
// Task type.
TaskType type = 2;
// Download url.
string url = 3;
// Verifies task data integrity after download using a digest. Supports CRC32, SHA256, and SHA512 algorithms.
// Format: `<algorithm>:<hash>`, e.g., `crc32:xxx`, `sha256:yyy`, `sha512:zzz`.
// Returns an error if the computed digest mismatches the expected value.
//
// Performance
// Digest calculation increases processing time. Enable only when data integrity verification is critical.
optional string digest = 4;
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 7;
// Task request headers.
map<string, string> request_header = 8;
// Task content length.
uint64 content_length = 9;
// Task piece count.
uint32 piece_count = 10;
// Task size scope.
SizeScope size_scope = 11;
// Pieces of task.
repeated Piece pieces = 12;
// Task state.
string state = 13;
// Task peer count.
uint32 peer_count = 14;
// Task contains available peer.
bool has_available_peer = 15;
// Task create time.
google.protobuf.Timestamp created_at = 16;
// Task update time.
google.protobuf.Timestamp updated_at = 17;
}
// PersistentCacheTask metadata.
message PersistentCacheTask {
// Task id.
@ -275,6 +355,8 @@ message Host {
uint64 scheduler_cluster_id = 17;
// Disable shared data for other peers.
bool disable_shared = 18;
// Port of proxy server.
int32 proxy_port = 19;
}
// CPU Stat.
@ -342,14 +424,23 @@ message Network {
optional string location = 3;
// IDC where the peer host is located
optional string idc = 4;
// Download rate is received bytes per second.
uint64 download_rate = 5;
// Download rate is the limit of received bytes per second.
uint64 download_rate_limit = 6;
// Upload rate is transmitted bytes per second.
uint64 upload_rate = 7;
// Upload rate is the limit of transmitted bytes per second.
uint64 upload_rate_limit = 8;
// Maximum bandwidth of the network interface, in bps (bits per second).
uint64 max_rx_bandwidth = 9;
// Receive bandwidth of the network interface, in bps (bits per second).
optional uint64 rx_bandwidth = 10;
// Maximum bandwidth of the network interface for transmission, in bps (bits per second).
uint64 max_tx_bandwidth = 11;
// Transmit bandwidth of the network interface, in bps (bits per second).
optional uint64 tx_bandwidth = 12;
reserved 5;
reserved "download_rate";
reserved 6;
reserved "download_rate_limit";
reserved 7;
reserved "upload_rate";
reserved 8;
reserved "upload_rate_limit";
}
// Disk Stat.
@ -441,10 +532,6 @@ message Download {
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
// Cache storage is designed to store downloaded piece content from preheat tasks,
// allowing other peers to access the content from memory instead of disk.
bool load_to_cache = 21;
// force_hard_link is the flag to indicate whether the download file must be hard linked to the output path.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
bool force_hard_link = 22;
@ -456,6 +543,9 @@ message Download {
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 24;
reserved 21;
reserved "load_to_cache";
}
// Object Storage related information.
@ -474,6 +564,8 @@ message ObjectStorage {
optional string credential_path = 6;
// Predefined ACL that used for the Google Cloud Storage service.
optional string predefined_acl = 7;
// Temporary STS security token for accessing OSS.
optional string security_token = 8;
}
// HDFS related information.

View File

@ -170,6 +170,161 @@ message DeleteTaskRequest {
optional string remote_ip = 2;
}
// DownloadCacheTaskRequest represents request of DownloadCacheTask.
message DownloadCacheTaskRequest {
// Download url.
string url = 1;
// Digest of the task digest, for example :xxx or sha256:yyy.
optional string digest = 2;
// 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.
optional common.v2.Range range = 3;
// Task type.
common.v2.TaskType type = 4;
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Peer priority.
common.v2.Priority priority = 7;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 8;
// Task request headers.
map<string, string> request_header = 9;
// Task piece length.
optional uint64 piece_length = 10;
// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
// it will copy the file to the output path after the download is completed.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
optional string output_path = 11;
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object storage protocol information.
optional common.v2.ObjectStorage object_storage = 17;
// HDFS protocol information.
optional common.v2.HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// content_for_calculating_task_id is the content used to calculate the task id.
// If content_for_calculating_task_id is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
optional string content_for_calculating_task_id = 21;
// remote_ip represents the IP address of the client initiating the download request.
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 22;
}
// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.
message DownloadCacheTaskStartedResponse {
// Task content length.
uint64 content_length = 1;
// Range is url range of request. If protocol is http, range
// is parsed from http header. If other protocol, range comes
// from download range field.
optional common.v2.Range range = 2;
// Task response headers.
map<string, string> response_header = 3;
// Need to download pieces.
repeated common.v2.Piece pieces = 4;
// is_finished indicates whether the download task is finished.
bool is_finished = 5;
}
// DownloadCacheTaskResponse represents response of DownloadCacheTask.
message DownloadCacheTaskResponse {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Peer id.
string peer_id = 3;
oneof response {
DownloadCacheTaskStartedResponse download_cache_task_started_response = 4;
DownloadPieceFinishedResponse download_piece_finished_response = 5;
}
}
// SyncCachePiecesRequest represents request of SyncCachePieces.
message SyncCachePiecesRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Interested piece numbers.
repeated uint32 interested_cache_piece_numbers = 3;
}
// SyncCachePiecesResponse represents response of SyncCachePieces.
message SyncCachePiecesResponse {
// Exist piece number.
uint32 number = 1;
// Piece offset.
uint64 offset = 2;
// Piece length.
uint64 length = 3;
}
// DownloadCachePieceRequest represents request of DownloadCachePiece.
message DownloadCachePieceRequest{
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Piece number.
uint32 piece_number = 3;
}
// DownloadCachePieceResponse represents response of DownloadCachePieces.
message DownloadCachePieceResponse {
// Piece information.
common.v2.Piece piece = 1;
// Piece metadata digest, it is used to verify the integrity of the piece metadata.
optional string digest = 2;
}
// StatCacheTaskRequest represents request of StatCacheTask.
message StatCacheTaskRequest {
// Task id.
string task_id = 1;
// Remote IP represents the IP address of the client initiating the stat request.
optional string remote_ip = 2;
// local_only specifies whether to query task information from local client only.
// If true, the query will be restricted to the local client.
// By default (false), the query may be forwarded to the scheduler
// for a cluster-wide search.
bool local_only = 3;
}
// DeleteCacheTaskRequest represents request of DeleteCacheTask.
message DeleteCacheTaskRequest {
// Task id.
string task_id = 1;
// Remote IP represents the IP address of the client initiating the delete request.
optional string remote_ip = 2;
}
// DownloadPersistentCacheTaskRequest represents request of DownloadPersistentCacheTask.
message DownloadPersistentCacheTaskRequest {
// Task id.
@ -364,6 +519,21 @@ service DfdaemonUpload {
// DownloadPiece downloads piece from the remote peer.
rpc DownloadPiece(DownloadPieceRequest)returns(DownloadPieceResponse);
// DownloadCacheTask downloads cache task from p2p network.
rpc DownloadCacheTask(DownloadCacheTaskRequest) returns(stream DownloadCacheTaskResponse);
// StatCacheTask stats cache task information.
rpc StatCacheTask(StatCacheTaskRequest) returns(common.v2.CacheTask);
// DeleteCacheTask deletes cache task from p2p network.
rpc DeleteCacheTask(DeleteCacheTaskRequest) returns(google.protobuf.Empty);
// SyncCachePieces syncs cache piece metadatas from remote peer.
rpc SyncCachePieces(SyncCachePiecesRequest) returns(stream SyncCachePiecesResponse);
// DownloadCachePiece downloads cache piece from the remote peer.
rpc DownloadCachePiece(DownloadCachePieceRequest)returns(DownloadCachePieceResponse);
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);
@ -406,6 +576,15 @@ service DfdaemonDownload {
// DeleteHost releases host in scheduler.
rpc DeleteHost(google.protobuf.Empty)returns(google.protobuf.Empty);
// DownloadCacheTask downloads cache task from p2p network.
rpc DownloadCacheTask(DownloadCacheTaskRequest) returns(stream DownloadCacheTaskResponse);
// StatCacheTask stats cache task information.
rpc StatCacheTask(StatCacheTaskRequest) returns(common.v2.CacheTask);
// DeleteCacheTask deletes cache task from p2p network.
rpc DeleteCacheTask(DeleteCacheTaskRequest) returns(google.protobuf.Empty);
// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);

View File

@ -215,6 +215,193 @@ message DeleteHostRequest{
string host_id = 1;
}
// RegisterCachePeerRequest represents cache peer registered request of AnnounceCachePeerRequest.
message RegisterCachePeerRequest {
// Download url.
string url = 1;
// Digest of the task digest, for example :xxx or sha256:yyy.
optional string digest = 2;
// 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.
optional common.v2.Range range = 3;
// Task type.
common.v2.TaskType type = 4;
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Peer priority.
common.v2.Priority priority = 7;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 8;
// Task request headers.
map<string, string> request_header = 9;
// Task piece length.
optional uint64 piece_length = 10;
// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
// it will copy the file to the output path after the download is completed.
// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
optional string output_path = 11;
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object storage protocol information.
optional common.v2.ObjectStorage object_storage = 17;
// HDFS protocol information.
optional common.v2.HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
// content_for_calculating_task_id is the content used to calculate the task id.
// If content_for_calculating_task_id is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
optional string content_for_calculating_task_id = 21;
// remote_ip represents the IP address of the client initiating the download request.
// For proxy requests, it is set to the IP address of the request source.
// For dfget requests, it is set to the IP address of the dfget.
optional string remote_ip = 22;
}
// DownloadCachePeerStartedRequest represents cache peer download started request of AnnounceCachePeerRequest.
message DownloadCachePeerStartedRequest {
}
// DownloadCachePeerBackToSourceStartedRequest represents cache peer download back-to-source started request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceStartedRequest {
// The description of the back-to-source reason.
optional string description = 1;
}
// RescheduleCachePeerRequest represents reschedule request of AnnounceCachePeerRequest.
message RescheduleCachePeerRequest {
// Candidate parent ids.
repeated common.v2.CachePeer candidate_parents = 1;
// The description of the reschedule reason.
optional string description = 2;
}
// DownloadCachePeerFinishedRequest represents cache peer download finished request of AnnounceCachePeerRequest.
message DownloadCachePeerFinishedRequest {
// Total content length.
uint64 content_length = 1;
// Total piece count.
uint32 piece_count = 2;
}
// DownloadCachePeerBackToSourceFinishedRequest represents cache peer download back-to-source finished request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceFinishedRequest {
// Total content length.
uint64 content_length = 1;
// Total piece count.
uint32 piece_count = 2;
}
// DownloadCachePeerFailedRequest represents cache peer download failed request of AnnounceCachePeerRequest.
message DownloadCachePeerFailedRequest {
// The description of the download failed.
optional string description = 1;
}
// DownloadCachePeerBackToSourceFailedRequest represents cache peer download back-to-source failed request of AnnounceCachePeerRequest.
message DownloadCachePeerBackToSourceFailedRequest {
// The description of the download back-to-source failed.
optional string description = 1;
}
// AnnounceCachePeerRequest represents request of AnnounceCachePeer.
message AnnounceCachePeerRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Peer id.
string peer_id = 3;
oneof request {
RegisterCachePeerRequest register_cache_peer_request = 4;
DownloadCachePeerStartedRequest download_cache_peer_started_request = 5;
DownloadCachePeerBackToSourceStartedRequest download_cache_peer_back_to_source_started_request = 6;
RescheduleCachePeerRequest reschedule_cache_peer_request = 7;
DownloadCachePeerFinishedRequest download_cache_peer_finished_request = 8;
DownloadCachePeerBackToSourceFinishedRequest download_cache_peer_back_to_source_finished_request = 9;
DownloadCachePeerFailedRequest download_cache_peer_failed_request = 10;
DownloadCachePeerBackToSourceFailedRequest download_cache_peer_back_to_source_failed_request = 11;
DownloadPieceFinishedRequest download_piece_finished_request = 12;
DownloadPieceBackToSourceFinishedRequest download_piece_back_to_source_finished_request = 13;
DownloadPieceFailedRequest download_piece_failed_request = 14;
DownloadPieceBackToSourceFailedRequest download_piece_back_to_source_failed_request = 15;
}
}
// EmptyCacheTaskResponse represents empty cache task response of AnnounceCachePeerResponse.
message EmptyCacheTaskResponse {
}
// NormalCacheTaskResponse represents normal cache task response of AnnounceCachePeerResponse.
message NormalCacheTaskResponse {
// Candidate parents.
repeated common.v2.CachePeer candidate_parents = 1;
}
// AnnounceCachePeerResponse represents response of AnnounceCachePeer.
message AnnounceCachePeerResponse {
oneof response {
EmptyCacheTaskResponse empty_cache_task_response = 1;
NormalCacheTaskResponse normal_cache_task_response = 2;
NeedBackToSourceResponse need_back_to_source_response = 3;
}
}
// StatCachePeerRequest represents request of StatCachePeer.
message StatCachePeerRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Peer id.
string peer_id = 3;
}
// DeleteCachePeerRequest represents request of DeleteCachePeer.
message DeleteCachePeerRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
// Peer id.
string peer_id = 3;
}
// StatCacheTaskRequest represents request of StatCacheTask.
message StatCacheTaskRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
}
// DeleteCacheTaskRequest represents request of DeleteCacheTask.
message DeleteCacheTaskRequest {
// Host id.
string host_id = 1;
// Task id.
string task_id = 2;
}
// RegisterPersistentCachePeerRequest represents persistent cache peer registered request of AnnouncePersistentCachePeerRequest.
message RegisterPersistentCachePeerRequest {
// Persistent represents whether the persistent cache task is persistent.
@ -378,6 +565,145 @@ message DeletePersistentCacheTaskRequest {
string task_id = 2;
}
// PreheatImageRequest represents request of PreheatImage.
message PreheatImageRequest {
// URL is the image manifest url for preheating.
string url = 1;
// Piece Length is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
optional uint64 piece_length = 2;
// Tag is the tag for preheating.
optional string tag = 3;
// Application is the application string for preheating.
optional string application = 4;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 5;
// Header is the http headers for authentication.
map<string, string> header = 6;
// Username is the username for authentication.
optional string username = 7;
// Password is the password for authentication.
optional string password = 8;
// Platform is the platform for preheating, such as linux/amd64, linux/arm64, etc.
optional string platform = 9;
// Scope is the scope for preheating, it can be one of the following values:
// - single_seed_peer: preheat from a single seed peer.
// - all_peers: preheat from all available peers.
// - all_seed_peers: preheat from all seed peers.
string scope = 10;
// IPs is a list of specific peer IPs for preheating.
// This field has the highest priority: if provided, both 'Count' and 'Percentage' will be ignored.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
repeated string ips = 11;
// Percentage is the percentage of available peers to preheat.
// This field has the lowest priority and is only used if both 'IPs' and 'Count' are not provided.
// It must be a value between 1 and 100 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
optional uint32 percentage = 12;
// Count is the desired number of peers to preheat.
// This field is used only when 'IPs' is not specified. It has priority over 'Percentage'.
// It must be a value between 1 and 200 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
optional uint32 count = 13;
// ConcurrentTaskCount specifies the maximum number of tasks (e.g., image layers) to preheat concurrently.
// For example, if preheating 100 layers with ConcurrentTaskCount set to 10, up to 10 layers are processed simultaneously.
// If ConcurrentPeerCount is 10 for 1000 peers, each layer is preheated by 10 peers concurrently.
// Default is 8, maximum is 100.
optional int64 concurrent_task_count = 14;
// ConcurrentPeerCount specifies the maximum number of peers to preheat concurrently for a single task (e.g., an image layer).
// For example, if preheating a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
optional int64 concurrent_peer_count = 15;
// Timeout is the timeout for preheating, default is 30 minutes.
optional google.protobuf.Duration timeout = 16;
// Preheat priority.
common.v2.Priority priority = 17;
// certificate_chain is the client certs with DER format for the backend client.
repeated bytes certificate_chain = 18;
// insecure_skip_verify indicates whether to skip TLS verification.
bool insecure_skip_verify = 19;
}
// StatImageRequest represents request of StatImage.
message StatImageRequest {
// URL is the image manifest url for preheating.
string url = 1;
// Piece Length is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
optional uint64 piece_length = 2;
// Tag is the tag for preheating.
optional string tag = 3;
// Application is the application string for preheating.
optional string application = 4;
// Filtered query params to generate the task id.
// When filter is ["Signature", "Expires", "ns"], for example:
// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
// will generate the same task id.
// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
repeated string filtered_query_params = 5;
// Header is the http headers for authentication.
map<string, string> header = 6;
// Username is the username for authentication.
optional string username = 7;
// Password is the password for authentication.
optional string password = 8;
// Platform is the platform for preheating, such as linux/amd64, linux/arm64, etc.
optional string platform = 9;
// ConcurrentLayerCount specifies the maximum number of layers to get concurrently.
// For example, if stat 100 layers with ConcurrentLayerCount set to 10, up to 10 layers are processed simultaneously.
// If ConcurrentPeerCount is 10 for 1000 peers, each layer is stated by 10 peers concurrently.
// Default is 8, maximum is 100.
optional int64 concurrent_layer_count = 10;
// ConcurrentPeerCount specifies the maximum number of peers stat concurrently for a single task (e.g., an image layer).
// For example, if stat a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
optional int64 concurrent_peer_count = 11;
// Timeout is the timeout for preheating, default is 30 minutes.
optional google.protobuf.Duration timeout = 12;
// certificate_chain is the client certs with DER format for the backend client.
repeated bytes certificate_chain = 13;
// insecure_skip_verify indicates whether to skip TLS verification.
bool insecure_skip_verify = 14;
}
// StatImageResponse represents response of StatImage.
message StatImageResponse {
// Image is the image information.
Image image = 1;
// Peers is the peers that have downloaded the image.
repeated PeerImage peers = 2;
}
// PeerImage represents a peer in the get image job.
message PeerImage {
// IP is the IP address of the peer.
string ip = 1;
// Hostname is the hostname of the peer.
string hostname = 2;
// CachedLayers is the list of layers that the peer has downloaded.
repeated Layer cached_layers = 3;
}
// Image represents the image information.
message Image {
// Layers is the list of layers of the image.
repeated Layer layers = 1;
}
// Layer represents a layer of the image.
message Layer {
// URL is the URL of the layer.
string url = 1;
}
// Scheduler RPC Service.
service Scheduler {
// AnnouncePeer announces peer to scheduler.
@ -404,6 +730,21 @@ service Scheduler {
// DeleteHost releases host in scheduler.
rpc DeleteHost(DeleteHostRequest)returns(google.protobuf.Empty);
// AnnounceCachePeer announces cache peer to scheduler.
rpc AnnounceCachePeer(stream AnnounceCachePeerRequest) returns(stream AnnounceCachePeerResponse);
// Checks information of cache peer.
rpc StatCachePeer(StatCachePeerRequest)returns(common.v2.CachePeer);
// DeletCacheePeer releases cache peer in scheduler.
rpc DeleteCachePeer(DeleteCachePeerRequest)returns(google.protobuf.Empty);
// Checks information of cache task.
rpc StatCacheTask(StatCacheTaskRequest)returns(common.v2.CacheTask);
// DeleteCacheTask releases cache task in scheduler.
rpc DeleteCacheTask(DeleteCacheTaskRequest)returns(google.protobuf.Empty);
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
rpc AnnouncePersistentCachePeer(stream AnnouncePersistentCachePeerRequest) returns(stream AnnouncePersistentCachePeerResponse);
@ -427,4 +768,23 @@ service Scheduler {
// DeletePersistentCacheTask releases persistent cache task in scheduler.
rpc DeletePersistentCacheTask(DeletePersistentCacheTaskRequest)returns(google.protobuf.Empty);
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
//
// This is a blocking call. The RPC will not return until the server has completed the
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
//
// After this call successfully returns, a scheduler on the server begins the actual
// preheating process, instructing peers to download the layers in the background.
//
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
// and the asynchronous download task has been scheduled.
rpc PreheatImage(PreheatImageRequest)returns(google.protobuf.Empty);
// StatImage provides detailed status for a container image's distribution in peers.
//
// This is a blocking call that first resolves the image manifest and then queries
// all peers to collect the image's download state across the network.
// The response includes both layer information and the status on each peer.
rpc StatImage(StatImageRequest)returns(StatImageResponse);
}

View File

@ -38,6 +38,45 @@ pub struct Peer {
#[prost(message, optional, tag = "11")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
/// CachePeer metadata.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CachePeer {
/// Peer id.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Range is url range of request.
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<Range>,
/// Peer priority.
#[prost(enumeration = "Priority", tag = "3")]
pub priority: i32,
/// Pieces of peer.
#[prost(message, repeated, tag = "4")]
pub pieces: ::prost::alloc::vec::Vec<Piece>,
/// Peer downloads costs time.
#[prost(message, optional, tag = "5")]
pub cost: ::core::option::Option<::prost_wkt_types::Duration>,
/// Peer state.
#[prost(string, tag = "6")]
pub state: ::prost::alloc::string::String,
/// Cache Task info.
#[prost(message, optional, tag = "7")]
pub task: ::core::option::Option<CacheTask>,
/// Host info.
#[prost(message, optional, tag = "8")]
pub host: ::core::option::Option<Host>,
/// NeedBackToSource needs downloaded from source.
#[prost(bool, tag = "9")]
pub need_back_to_source: bool,
/// Peer create time.
#[prost(message, optional, tag = "10")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
/// Peer update time.
#[prost(message, optional, tag = "11")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
/// PersistentCachePeer metadata.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
@ -140,6 +179,75 @@ pub struct Task {
#[prost(message, optional, tag = "17")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
/// CacheTask metadata.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheTask {
/// Task id.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Task type.
#[prost(enumeration = "TaskType", tag = "2")]
pub r#type: i32,
/// Download url.
#[prost(string, tag = "3")]
pub url: ::prost::alloc::string::String,
/// Verifies task data integrity after download using a digest. Supports CRC32, SHA256, and SHA512 algorithms.
/// Format: `<algorithm>:<hash>`, e.g., `crc32:xxx`, `sha256:yyy`, `sha512:zzz`.
/// Returns an error if the computed digest mismatches the expected value.
///
/// Performance
/// Digest calculation increases processing time. Enable only when data integrity verification is critical.
#[prost(string, optional, tag = "4")]
pub digest: ::core::option::Option<::prost::alloc::string::String>,
/// URL tag identifies different task for same url.
#[prost(string, optional, tag = "5")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
/// Application of task.
#[prost(string, optional, tag = "6")]
pub application: ::core::option::Option<::prost::alloc::string::String>,
/// Filtered query params to generate the task id.
/// When filter is \["Signature", "Expires", "ns"\], for example:
/// <http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io> and <http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io>
/// will generate the same task id.
/// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
#[prost(string, repeated, tag = "7")]
pub filtered_query_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Task request headers.
#[prost(map = "string, string", tag = "8")]
pub request_header: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Task content length.
#[prost(uint64, tag = "9")]
pub content_length: u64,
/// Task piece count.
#[prost(uint32, tag = "10")]
pub piece_count: u32,
/// Task size scope.
#[prost(enumeration = "SizeScope", tag = "11")]
pub size_scope: i32,
/// Pieces of task.
#[prost(message, repeated, tag = "12")]
pub pieces: ::prost::alloc::vec::Vec<Piece>,
/// Task state.
#[prost(string, tag = "13")]
pub state: ::prost::alloc::string::String,
/// Task peer count.
#[prost(uint32, tag = "14")]
pub peer_count: u32,
/// Task contains available peer.
#[prost(bool, tag = "15")]
pub has_available_peer: bool,
/// Task create time.
#[prost(message, optional, tag = "16")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
/// Task update time.
#[prost(message, optional, tag = "17")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
/// PersistentCacheTask metadata.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
@ -249,6 +357,9 @@ pub struct Host {
/// Disable shared data for other peers.
#[prost(bool, tag = "18")]
pub disable_shared: bool,
/// Port of proxy server.
#[prost(int32, tag = "19")]
pub proxy_port: i32,
}
/// CPU Stat.
#[derive(serde::Serialize, serde::Deserialize)]
@ -349,18 +460,18 @@ pub struct Network {
/// IDC where the peer host is located
#[prost(string, optional, tag = "4")]
pub idc: ::core::option::Option<::prost::alloc::string::String>,
/// Download rate is received bytes per second.
#[prost(uint64, tag = "5")]
pub download_rate: u64,
/// Download rate is the limit of received bytes per second.
#[prost(uint64, tag = "6")]
pub download_rate_limit: u64,
/// Upload rate is transmitted bytes per second.
#[prost(uint64, tag = "7")]
pub upload_rate: u64,
/// Upload rate is the limit of transmitted bytes per second.
#[prost(uint64, tag = "8")]
pub upload_rate_limit: u64,
/// Maximum bandwidth of the network interface, in bps (bits per second).
#[prost(uint64, tag = "9")]
pub max_rx_bandwidth: u64,
/// Receive bandwidth of the network interface, in bps (bits per second).
#[prost(uint64, optional, tag = "10")]
pub rx_bandwidth: ::core::option::Option<u64>,
/// Maximum bandwidth of the network interface for transmission, in bps (bits per second).
#[prost(uint64, tag = "11")]
pub max_tx_bandwidth: u64,
/// Transmit bandwidth of the network interface, in bps (bits per second).
#[prost(uint64, optional, tag = "12")]
pub tx_bandwidth: ::core::option::Option<u64>,
}
/// Disk Stat.
#[derive(serde::Serialize, serde::Deserialize)]
@ -496,11 +607,6 @@ pub struct Download {
/// need_piece_content is the flag to indicate whether the response needs to return piece content.
#[prost(bool, tag = "20")]
pub need_piece_content: bool,
/// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
/// Cache storage is designed to store downloaded piece content from preheat tasks,
/// allowing other peers to access the content from memory instead of disk.
#[prost(bool, tag = "21")]
pub load_to_cache: bool,
/// force_hard_link is the flag to indicate whether the download file must be hard linked to the output path.
/// For more details refer to <https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.>
#[prost(bool, tag = "22")]
@ -544,6 +650,9 @@ pub struct ObjectStorage {
/// Predefined ACL that used for the Google Cloud Storage service.
#[prost(string, optional, tag = "7")]
pub predefined_acl: ::core::option::Option<::prost::alloc::string::String>,
/// Temporary STS security token for accessing OSS.
#[prost(string, optional, tag = "8")]
pub security_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// HDFS related information.
#[derive(serde::Serialize, serde::Deserialize)]
@ -646,7 +755,7 @@ pub enum TaskType {
/// local peer(local cache). When the standard task is never downloaded in the
/// P2P cluster, dfdaemon will download the task from the source. When the standard
/// task is downloaded in the P2P cluster, dfdaemon will download the task from
/// the remote peer or local peer(local cache).
/// the remote peer or local peer(local cache), where peers use disk storage to store tasks.
Standard = 0,
/// PERSISTENT is persistent type of task, it can import file and export file in P2P cluster.
/// When the persistent task is imported into the P2P cluster, dfdaemon will store
@ -658,6 +767,12 @@ pub enum TaskType {
/// the task in the peer's disk and copy multiple replicas to remote peers to prevent data loss.
/// When the expiration time is reached, task will be deleted in the P2P cluster.
PersistentCache = 2,
/// CACHE is cache type of task, it can download from source, remote peer and
/// local peer(local cache). When the cache task is never downloaded in the
/// P2P cluster, dfdaemon will download the cache task from the source. When the cache
/// task is downloaded in the P2P cluster, dfdaemon will download the cache task from
/// the remote peer or local peer(local cache), where peers use memory storage to store cache tasks.
Cache = 3,
}
impl TaskType {
/// String value of the enum field names used in the ProtoBuf definition.
@ -669,6 +784,7 @@ impl TaskType {
TaskType::Standard => "STANDARD",
TaskType::Persistent => "PERSISTENT",
TaskType::PersistentCache => "PERSISTENT_CACHE",
TaskType::Cache => "CACHE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
@ -677,6 +793,7 @@ impl TaskType {
"STANDARD" => Some(Self::Standard),
"PERSISTENT" => Some(Self::Persistent),
"PERSISTENT_CACHE" => Some(Self::PersistentCache),
"CACHE" => Some(Self::Cache),
_ => None,
}
}

Binary file not shown.

View File

@ -228,6 +228,238 @@ pub struct DeleteTaskRequest {
#[prost(string, optional, tag = "2")]
pub remote_ip: ::core::option::Option<::prost::alloc::string::String>,
}
/// DownloadCacheTaskRequest represents request of DownloadCacheTask.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadCacheTaskRequest {
/// Download url.
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
/// Digest of the task digest, for example :xxx or sha256:yyy.
#[prost(string, optional, tag = "2")]
pub digest: ::core::option::Option<::prost::alloc::string::String>,
/// 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.
#[prost(message, optional, tag = "3")]
pub range: ::core::option::Option<super::super::common::v2::Range>,
/// Task type.
#[prost(enumeration = "super::super::common::v2::TaskType", tag = "4")]
pub r#type: i32,
/// URL tag identifies different task for same url.
#[prost(string, optional, tag = "5")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
/// Application of task.
#[prost(string, optional, tag = "6")]
pub application: ::core::option::Option<::prost::alloc::string::String>,
/// Peer priority.
#[prost(enumeration = "super::super::common::v2::Priority", tag = "7")]
pub priority: i32,
/// Filtered query params to generate the task id.
/// When filter is \["Signature", "Expires", "ns"\], for example:
/// <http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io> and <http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io>
/// will generate the same task id.
/// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
#[prost(string, repeated, tag = "8")]
pub filtered_query_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Task request headers.
#[prost(map = "string, string", tag = "9")]
pub request_header: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Task piece length.
#[prost(uint64, optional, tag = "10")]
pub piece_length: ::core::option::Option<u64>,
/// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
/// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
/// it will copy the file to the output path after the download is completed.
/// For more details refer to <https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.>
#[prost(string, optional, tag = "11")]
pub output_path: ::core::option::Option<::prost::alloc::string::String>,
/// Download timeout.
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
/// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
#[prost(bool, tag = "13")]
pub disable_back_to_source: bool,
/// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
#[prost(bool, tag = "14")]
pub need_back_to_source: bool,
/// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
#[prost(bytes = "vec", repeated, tag = "15")]
pub certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
/// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
#[prost(bool, tag = "16")]
pub prefetch: bool,
/// Object storage protocol information.
#[prost(message, optional, tag = "17")]
pub object_storage: ::core::option::Option<super::super::common::v2::ObjectStorage>,
/// HDFS protocol information.
#[prost(message, optional, tag = "18")]
pub hdfs: ::core::option::Option<super::super::common::v2::Hdfs>,
/// is_prefetch is the flag to indicate whether the request is a prefetch request.
#[prost(bool, tag = "19")]
pub is_prefetch: bool,
/// need_piece_content is the flag to indicate whether the response needs to return piece content.
#[prost(bool, tag = "20")]
pub need_piece_content: bool,
/// content_for_calculating_task_id is the content used to calculate the task id.
/// If content_for_calculating_task_id is set, use its value to calculate the task ID.
/// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
#[prost(string, optional, tag = "21")]
pub content_for_calculating_task_id: ::core::option::Option<
::prost::alloc::string::String,
>,
/// remote_ip represents the IP address of the client initiating the download request.
/// For proxy requests, it is set to the IP address of the request source.
/// For dfget requests, it is set to the IP address of the dfget.
#[prost(string, optional, tag = "22")]
pub remote_ip: ::core::option::Option<::prost::alloc::string::String>,
}
/// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadCacheTaskStartedResponse {
/// Task content length.
#[prost(uint64, tag = "1")]
pub content_length: u64,
/// Range is url range of request. If protocol is http, range
/// is parsed from http header. If other protocol, range comes
/// from download range field.
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<super::super::common::v2::Range>,
/// Task response headers.
#[prost(map = "string, string", tag = "3")]
pub response_header: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Need to download pieces.
#[prost(message, repeated, tag = "4")]
pub pieces: ::prost::alloc::vec::Vec<super::super::common::v2::Piece>,
/// is_finished indicates whether the download task is finished.
#[prost(bool, tag = "5")]
pub is_finished: bool,
}
/// DownloadCacheTaskResponse represents response of DownloadCacheTask.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadCacheTaskResponse {
/// Host id.
#[prost(string, tag = "1")]
pub host_id: ::prost::alloc::string::String,
/// Task id.
#[prost(string, tag = "2")]
pub task_id: ::prost::alloc::string::String,
/// Peer id.
#[prost(string, tag = "3")]
pub peer_id: ::prost::alloc::string::String,
#[prost(oneof = "download_cache_task_response::Response", tags = "4, 5")]
pub response: ::core::option::Option<download_cache_task_response::Response>,
}
/// Nested message and enum types in `DownloadCacheTaskResponse`.
pub mod download_cache_task_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "4")]
DownloadCacheTaskStartedResponse(super::DownloadCacheTaskStartedResponse),
#[prost(message, tag = "5")]
DownloadPieceFinishedResponse(super::DownloadPieceFinishedResponse),
}
}
/// SyncCachePiecesRequest represents request of SyncCachePieces.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncCachePiecesRequest {
/// Host id.
#[prost(string, tag = "1")]
pub host_id: ::prost::alloc::string::String,
/// Task id.
#[prost(string, tag = "2")]
pub task_id: ::prost::alloc::string::String,
/// Interested piece numbers.
#[prost(uint32, repeated, tag = "3")]
pub interested_cache_piece_numbers: ::prost::alloc::vec::Vec<u32>,
}
/// SyncCachePiecesResponse represents response of SyncCachePieces.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SyncCachePiecesResponse {
/// Exist piece number.
#[prost(uint32, tag = "1")]
pub number: u32,
/// Piece offset.
#[prost(uint64, tag = "2")]
pub offset: u64,
/// Piece length.
#[prost(uint64, tag = "3")]
pub length: u64,
}
/// DownloadCachePieceRequest represents request of DownloadCachePiece.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadCachePieceRequest {
/// Host id.
#[prost(string, tag = "1")]
pub host_id: ::prost::alloc::string::String,
/// Task id.
#[prost(string, tag = "2")]
pub task_id: ::prost::alloc::string::String,
/// Piece number.
#[prost(uint32, tag = "3")]
pub piece_number: u32,
}
/// DownloadCachePieceResponse represents response of DownloadCachePieces.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadCachePieceResponse {
/// Piece information.
#[prost(message, optional, tag = "1")]
pub piece: ::core::option::Option<super::super::common::v2::Piece>,
/// Piece metadata digest, it is used to verify the integrity of the piece metadata.
#[prost(string, optional, tag = "2")]
pub digest: ::core::option::Option<::prost::alloc::string::String>,
}
/// StatCacheTaskRequest represents request of StatCacheTask.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatCacheTaskRequest {
/// Task id.
#[prost(string, tag = "1")]
pub task_id: ::prost::alloc::string::String,
/// Remote IP represents the IP address of the client initiating the stat request.
#[prost(string, optional, tag = "2")]
pub remote_ip: ::core::option::Option<::prost::alloc::string::String>,
/// local_only specifies whether to query task information from local client only.
/// If true, the query will be restricted to the local client.
/// By default (false), the query may be forwarded to the scheduler
/// for a cluster-wide search.
#[prost(bool, tag = "3")]
pub local_only: bool,
}
/// DeleteCacheTaskRequest represents request of DeleteCacheTask.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCacheTaskRequest {
/// Task id.
#[prost(string, tag = "1")]
pub task_id: ::prost::alloc::string::String,
/// Remote IP represents the IP address of the client initiating the delete request.
#[prost(string, optional, tag = "2")]
pub remote_ip: ::core::option::Option<::prost::alloc::string::String>,
}
/// DownloadPersistentCacheTaskRequest represents request of DownloadPersistentCacheTask.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
@ -711,6 +943,141 @@ pub mod dfdaemon_upload_client {
.insert(GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DownloadPiece"));
self.inner.unary(req, path, codec).await
}
/// DownloadCacheTask downloads cache task from p2p network.
pub async fn download_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::DownloadCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::DownloadCacheTaskResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonUpload/DownloadCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DownloadCacheTask"),
);
self.inner.server_streaming(req, path, codec).await
}
/// StatCacheTask stats cache task information.
pub async fn stat_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::StatCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::CacheTask>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonUpload/StatCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "StatCacheTask"));
self.inner.unary(req, path, codec).await
}
/// DeleteCacheTask deletes cache task from p2p network.
pub async fn delete_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCacheTaskRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonUpload/DeleteCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DeleteCacheTask"),
);
self.inner.unary(req, path, codec).await
}
/// SyncCachePieces syncs cache piece metadatas from remote peer.
pub async fn sync_cache_pieces(
&mut self,
request: impl tonic::IntoRequest<super::SyncCachePiecesRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::SyncCachePiecesResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonUpload/SyncCachePieces",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "SyncCachePieces"),
);
self.inner.server_streaming(req, path, codec).await
}
/// DownloadCachePiece downloads cache piece from the remote peer.
pub async fn download_cache_piece(
&mut self,
request: impl tonic::IntoRequest<super::DownloadCachePieceRequest>,
) -> std::result::Result<
tonic::Response<super::DownloadCachePieceResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonUpload/DownloadCachePiece",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DownloadCachePiece"),
);
self.inner.unary(req, path, codec).await
}
/// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
pub async fn download_persistent_cache_task(
&mut self,
@ -1170,6 +1537,87 @@ pub mod dfdaemon_download_client {
.insert(GrpcMethod::new("dfdaemon.v2.DfdaemonDownload", "DeleteHost"));
self.inner.unary(req, path, codec).await
}
/// DownloadCacheTask downloads cache task from p2p network.
pub async fn download_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::DownloadCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::DownloadCacheTaskResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonDownload/DownloadCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonDownload", "DownloadCacheTask"),
);
self.inner.server_streaming(req, path, codec).await
}
/// StatCacheTask stats cache task information.
pub async fn stat_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::StatCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::CacheTask>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonDownload/StatCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonDownload", "StatCacheTask"),
);
self.inner.unary(req, path, codec).await
}
/// DeleteCacheTask deletes cache task from p2p network.
pub async fn delete_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCacheTaskRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/dfdaemon.v2.DfdaemonDownload/DeleteCacheTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("dfdaemon.v2.DfdaemonDownload", "DeleteCacheTask"),
);
self.inner.unary(req, path, codec).await
}
/// DownloadPersistentCacheTask downloads persistent cache task from p2p network.
pub async fn download_persistent_cache_task(
&mut self,
@ -1320,6 +1768,58 @@ pub mod dfdaemon_upload_server {
tonic::Response<super::DownloadPieceResponse>,
tonic::Status,
>;
/// Server streaming response type for the DownloadCacheTask method.
type DownloadCacheTaskStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::DownloadCacheTaskResponse,
tonic::Status,
>,
>
+ std::marker::Send
+ 'static;
/// DownloadCacheTask downloads cache task from p2p network.
async fn download_cache_task(
&self,
request: tonic::Request<super::DownloadCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<Self::DownloadCacheTaskStream>,
tonic::Status,
>;
/// StatCacheTask stats cache task information.
async fn stat_cache_task(
&self,
request: tonic::Request<super::StatCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::CacheTask>,
tonic::Status,
>;
/// DeleteCacheTask deletes cache task from p2p network.
async fn delete_cache_task(
&self,
request: tonic::Request<super::DeleteCacheTaskRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
/// Server streaming response type for the SyncCachePieces method.
type SyncCachePiecesStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::SyncCachePiecesResponse, tonic::Status>,
>
+ std::marker::Send
+ 'static;
/// SyncCachePieces syncs cache piece metadatas from remote peer.
async fn sync_cache_pieces(
&self,
request: tonic::Request<super::SyncCachePiecesRequest>,
) -> std::result::Result<
tonic::Response<Self::SyncCachePiecesStream>,
tonic::Status,
>;
/// DownloadCachePiece downloads cache piece from the remote peer.
async fn download_cache_piece(
&self,
request: tonic::Request<super::DownloadCachePieceRequest>,
) -> std::result::Result<
tonic::Response<super::DownloadCachePieceResponse>,
tonic::Status,
>;
/// Server streaming response type for the DownloadPersistentCacheTask method.
type DownloadPersistentCacheTaskStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
@ -1707,6 +2207,240 @@ pub mod dfdaemon_upload_server {
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/DownloadCacheTask" => {
#[allow(non_camel_case_types)]
struct DownloadCacheTaskSvc<T: DfdaemonUpload>(pub Arc<T>);
impl<
T: DfdaemonUpload,
> tonic::server::ServerStreamingService<
super::DownloadCacheTaskRequest,
> for DownloadCacheTaskSvc<T> {
type Response = super::DownloadCacheTaskResponse;
type ResponseStream = T::DownloadCacheTaskStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DownloadCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonUpload>::download_cache_task(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DownloadCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/StatCacheTask" => {
#[allow(non_camel_case_types)]
struct StatCacheTaskSvc<T: DfdaemonUpload>(pub Arc<T>);
impl<
T: DfdaemonUpload,
> tonic::server::UnaryService<super::StatCacheTaskRequest>
for StatCacheTaskSvc<T> {
type Response = super::super::super::common::v2::CacheTask;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::StatCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonUpload>::stat_cache_task(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = StatCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/DeleteCacheTask" => {
#[allow(non_camel_case_types)]
struct DeleteCacheTaskSvc<T: DfdaemonUpload>(pub Arc<T>);
impl<
T: DfdaemonUpload,
> tonic::server::UnaryService<super::DeleteCacheTaskRequest>
for DeleteCacheTaskSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonUpload>::delete_cache_task(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DeleteCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/SyncCachePieces" => {
#[allow(non_camel_case_types)]
struct SyncCachePiecesSvc<T: DfdaemonUpload>(pub Arc<T>);
impl<
T: DfdaemonUpload,
> tonic::server::ServerStreamingService<
super::SyncCachePiecesRequest,
> for SyncCachePiecesSvc<T> {
type Response = super::SyncCachePiecesResponse;
type ResponseStream = T::SyncCachePiecesStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SyncCachePiecesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonUpload>::sync_cache_pieces(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SyncCachePiecesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/DownloadCachePiece" => {
#[allow(non_camel_case_types)]
struct DownloadCachePieceSvc<T: DfdaemonUpload>(pub Arc<T>);
impl<
T: DfdaemonUpload,
> tonic::server::UnaryService<super::DownloadCachePieceRequest>
for DownloadCachePieceSvc<T> {
type Response = super::DownloadCachePieceResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DownloadCachePieceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonUpload>::download_cache_piece(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DownloadCachePieceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonUpload/DownloadPersistentCacheTask" => {
#[allow(non_camel_case_types)]
struct DownloadPersistentCacheTaskSvc<T: DfdaemonUpload>(pub Arc<T>);
@ -2205,6 +2939,36 @@ pub mod dfdaemon_download_server {
&self,
request: tonic::Request<()>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
/// Server streaming response type for the DownloadCacheTask method.
type DownloadCacheTaskStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::DownloadCacheTaskResponse,
tonic::Status,
>,
>
+ std::marker::Send
+ 'static;
/// DownloadCacheTask downloads cache task from p2p network.
async fn download_cache_task(
&self,
request: tonic::Request<super::DownloadCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<Self::DownloadCacheTaskStream>,
tonic::Status,
>;
/// StatCacheTask stats cache task information.
async fn stat_cache_task(
&self,
request: tonic::Request<super::StatCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::CacheTask>,
tonic::Status,
>;
/// DeleteCacheTask deletes cache task from p2p network.
async fn delete_cache_task(
&self,
request: tonic::Request<super::DeleteCacheTaskRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
/// Server streaming response type for the DownloadPersistentCacheTask method.
type DownloadPersistentCacheTaskStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
@ -2539,6 +3303,149 @@ pub mod dfdaemon_download_server {
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonDownload/DownloadCacheTask" => {
#[allow(non_camel_case_types)]
struct DownloadCacheTaskSvc<T: DfdaemonDownload>(pub Arc<T>);
impl<
T: DfdaemonDownload,
> tonic::server::ServerStreamingService<
super::DownloadCacheTaskRequest,
> for DownloadCacheTaskSvc<T> {
type Response = super::DownloadCacheTaskResponse;
type ResponseStream = T::DownloadCacheTaskStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DownloadCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonDownload>::download_cache_task(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DownloadCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonDownload/StatCacheTask" => {
#[allow(non_camel_case_types)]
struct StatCacheTaskSvc<T: DfdaemonDownload>(pub Arc<T>);
impl<
T: DfdaemonDownload,
> tonic::server::UnaryService<super::StatCacheTaskRequest>
for StatCacheTaskSvc<T> {
type Response = super::super::super::common::v2::CacheTask;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::StatCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonDownload>::stat_cache_task(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = StatCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonDownload/DeleteCacheTask" => {
#[allow(non_camel_case_types)]
struct DeleteCacheTaskSvc<T: DfdaemonDownload>(pub Arc<T>);
impl<
T: DfdaemonDownload,
> tonic::server::UnaryService<super::DeleteCacheTaskRequest>
for DeleteCacheTaskSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteCacheTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DfdaemonDownload>::delete_cache_task(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DeleteCacheTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/dfdaemon.v2.DfdaemonDownload/DownloadPersistentCacheTask" => {
#[allow(non_camel_case_types)]
struct DownloadPersistentCacheTaskSvc<T: DfdaemonDownload>(

File diff suppressed because it is too large Load Diff