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>
This commit is contained in:
fu220 2025-07-23 03:47:32 +00:00
parent 8a5885e249
commit 731e6468a3
14 changed files with 2209 additions and 1258 deletions

View File

@ -107,7 +107,7 @@ const (
// 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.
TaskType_STANDARD TaskType = 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
@ -119,8 +119,11 @@ const (
// 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.
TaskType_PERSISTENT_CACHE TaskType = 2
// CACHE is cache type of task, it can import file and export file in P2P cluster.
// When the cache task is imported into the P2P cluster, dfdaemon will download the cache task from the cache of remote peer.
// 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.
TaskType_CACHE TaskType = 3
)
@ -2154,10 +2157,6 @@ type Download struct {
IsPrefetch bool `protobuf:"varint,19,opt,name=is_prefetch,json=isPrefetch,proto3" json:"is_prefetch,omitempty"`
// need_piece_content is the flag to indicate whether the response needs to return piece content.
NeedPieceContent bool `protobuf:"varint,20,opt,name=need_piece_content,json=needPieceContent,proto3" json:"need_piece_content,omitempty"`
// 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.
ForceHardLink bool `protobuf:"varint,22,opt,name=force_hard_link,json=forceHardLink,proto3" json:"force_hard_link,omitempty"`
@ -2364,6 +2363,257 @@ func (x *Download) GetRemoteIp() string {
return ""
}
// CacheDownload information.
type CacheDownload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Download url.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// Digest of the task digest, for example blake3:xxx or sha256:yyy.
Digest *string `protobuf:"bytes,2,opt,name=digest,proto3,oneof" json:"digest,omitempty"`
// 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.
Range *Range `protobuf:"bytes,3,opt,name=range,proto3,oneof" json:"range,omitempty"`
// Task type.
Type TaskType `protobuf:"varint,4,opt,name=type,proto3,enum=common.v2.TaskType" json:"type,omitempty"`
// URL tag identifies different task for same url.
Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"`
// Application of task.
Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"`
// Peer priority.
Priority Priority `protobuf:"varint,7,opt,name=priority,proto3,enum=common.v2.Priority" json:"priority,omitempty"`
// 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.
FilteredQueryParams []string `protobuf:"bytes,8,rep,name=filtered_query_params,json=filteredQueryParams,proto3" json:"filtered_query_params,omitempty"`
// Task request headers.
RequestHeader map[string]string `protobuf:"bytes,9,rep,name=request_header,json=requestHeader,proto3" json:"request_header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Task piece length, the value needs to be greater than or equal to 4194304(4MiB).
PieceLength *uint64 `protobuf:"varint,10,opt,name=piece_length,json=pieceLength,proto3,oneof" json:"piece_length,omitempty"`
// 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.
OutputPath *string `protobuf:"bytes,11,opt,name=output_path,json=outputPath,proto3,oneof" json:"output_path,omitempty"`
// Download timeout.
Timeout *durationpb.Duration `protobuf:"bytes,12,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
DisableBackToSource bool `protobuf:"varint,13,opt,name=disable_back_to_source,json=disableBackToSource,proto3" json:"disable_back_to_source,omitempty"`
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
NeedBackToSource bool `protobuf:"varint,14,opt,name=need_back_to_source,json=needBackToSource,proto3" json:"need_back_to_source,omitempty"`
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
CertificateChain [][]byte `protobuf:"bytes,15,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"`
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
Prefetch bool `protobuf:"varint,16,opt,name=prefetch,proto3" json:"prefetch,omitempty"`
// Object storage protocol information.
ObjectStorage *ObjectStorage `protobuf:"bytes,17,opt,name=object_storage,json=objectStorage,proto3,oneof" json:"object_storage,omitempty"`
// HDFS protocol information.
Hdfs *HDFS `protobuf:"bytes,18,opt,name=hdfs,proto3,oneof" json:"hdfs,omitempty"`
// is_prefetch is the flag to indicate whether the request is a prefetch request.
IsPrefetch bool `protobuf:"varint,19,opt,name=is_prefetch,json=isPrefetch,proto3" json:"is_prefetch,omitempty"`
// need_piece_content is the flag to indicate whether the response needs to return piece content.
NeedPieceContent bool `protobuf:"varint,20,opt,name=need_piece_content,json=needPieceContent,proto3" json:"need_piece_content,omitempty"`
// 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.
ContentForCalculatingTaskId *string `protobuf:"bytes,21,opt,name=content_for_calculating_task_id,json=contentForCalculatingTaskId,proto3,oneof" json:"content_for_calculating_task_id,omitempty"`
// 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.
RemoteIp *string `protobuf:"bytes,22,opt,name=remote_ip,json=remoteIp,proto3,oneof" json:"remote_ip,omitempty"`
}
func (x *CacheDownload) Reset() {
*x = CacheDownload{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CacheDownload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CacheDownload) ProtoMessage() {}
func (x *CacheDownload) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CacheDownload.ProtoReflect.Descriptor instead.
func (*CacheDownload) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{14}
}
func (x *CacheDownload) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *CacheDownload) GetDigest() string {
if x != nil && x.Digest != nil {
return *x.Digest
}
return ""
}
func (x *CacheDownload) GetRange() *Range {
if x != nil {
return x.Range
}
return nil
}
func (x *CacheDownload) GetType() TaskType {
if x != nil {
return x.Type
}
return TaskType_STANDARD
}
func (x *CacheDownload) GetTag() string {
if x != nil && x.Tag != nil {
return *x.Tag
}
return ""
}
func (x *CacheDownload) GetApplication() string {
if x != nil && x.Application != nil {
return *x.Application
}
return ""
}
func (x *CacheDownload) GetPriority() Priority {
if x != nil {
return x.Priority
}
return Priority_LEVEL0
}
func (x *CacheDownload) GetFilteredQueryParams() []string {
if x != nil {
return x.FilteredQueryParams
}
return nil
}
func (x *CacheDownload) GetRequestHeader() map[string]string {
if x != nil {
return x.RequestHeader
}
return nil
}
func (x *CacheDownload) GetPieceLength() uint64 {
if x != nil && x.PieceLength != nil {
return *x.PieceLength
}
return 0
}
func (x *CacheDownload) GetOutputPath() string {
if x != nil && x.OutputPath != nil {
return *x.OutputPath
}
return ""
}
func (x *CacheDownload) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *CacheDownload) GetDisableBackToSource() bool {
if x != nil {
return x.DisableBackToSource
}
return false
}
func (x *CacheDownload) GetNeedBackToSource() bool {
if x != nil {
return x.NeedBackToSource
}
return false
}
func (x *CacheDownload) GetCertificateChain() [][]byte {
if x != nil {
return x.CertificateChain
}
return nil
}
func (x *CacheDownload) GetPrefetch() bool {
if x != nil {
return x.Prefetch
}
return false
}
func (x *CacheDownload) GetObjectStorage() *ObjectStorage {
if x != nil {
return x.ObjectStorage
}
return nil
}
func (x *CacheDownload) GetHdfs() *HDFS {
if x != nil {
return x.Hdfs
}
return nil
}
func (x *CacheDownload) GetIsPrefetch() bool {
if x != nil {
return x.IsPrefetch
}
return false
}
func (x *CacheDownload) GetNeedPieceContent() bool {
if x != nil {
return x.NeedPieceContent
}
return false
}
func (x *CacheDownload) GetContentForCalculatingTaskId() string {
if x != nil && x.ContentForCalculatingTaskId != nil {
return *x.ContentForCalculatingTaskId
}
return ""
}
func (x *CacheDownload) GetRemoteIp() string {
if x != nil && x.RemoteIp != nil {
return *x.RemoteIp
}
return ""
}
// Object Storage related information.
type ObjectStorage struct {
state protoimpl.MessageState
@ -2389,7 +2639,7 @@ type ObjectStorage struct {
func (x *ObjectStorage) Reset() {
*x = ObjectStorage{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[14]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2402,7 +2652,7 @@ func (x *ObjectStorage) String() string {
func (*ObjectStorage) ProtoMessage() {}
func (x *ObjectStorage) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[14]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2415,7 +2665,7 @@ func (x *ObjectStorage) ProtoReflect() protoreflect.Message {
// Deprecated: Use ObjectStorage.ProtoReflect.Descriptor instead.
func (*ObjectStorage) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{14}
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{15}
}
func (x *ObjectStorage) GetRegion() string {
@ -2480,7 +2730,7 @@ type HDFS struct {
func (x *HDFS) Reset() {
*x = HDFS{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[15]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2493,7 +2743,7 @@ func (x *HDFS) String() string {
func (*HDFS) ProtoMessage() {}
func (x *HDFS) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[15]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2506,7 +2756,7 @@ func (x *HDFS) ProtoReflect() protoreflect.Message {
// Deprecated: Use HDFS.ProtoReflect.Descriptor instead.
func (*HDFS) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{15}
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{16}
}
func (x *HDFS) GetDelegationToken() string {
@ -2531,7 +2781,7 @@ type Range struct {
func (x *Range) Reset() {
*x = Range{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[16]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2544,7 +2794,7 @@ func (x *Range) String() string {
func (*Range) ProtoMessage() {}
func (x *Range) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[16]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2557,7 +2807,7 @@ func (x *Range) ProtoReflect() protoreflect.Message {
// Deprecated: Use Range.ProtoReflect.Descriptor instead.
func (*Range) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{16}
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{17}
}
func (x *Range) GetStart() uint64 {
@ -2603,7 +2853,7 @@ type Piece struct {
func (x *Piece) Reset() {
*x = Piece{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[17]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2616,7 +2866,7 @@ func (x *Piece) String() string {
func (*Piece) ProtoMessage() {}
func (x *Piece) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[17]
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2629,7 +2879,7 @@ func (x *Piece) ProtoReflect() protoreflect.Message {
// Deprecated: Use Piece.ProtoReflect.Descriptor instead.
func (*Piece) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{17}
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{18}
}
func (x *Piece) GetNumber() uint32 {
@ -3230,106 +3480,197 @@ var file_pkg_apis_common_v2_common_proto_rawDesc = []byte{
0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73,
0x6b, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f,
0x69, 0x70, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x52, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74,
0x6f, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x22, 0xf2, 0x03, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x72, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x88,
0x01, 0x01, 0x12, 0x2b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02,
0x6f, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x22, 0xb0, 0x0b, 0x0a, 0x0d, 0x43, 0x61, 0x63, 0x68,
0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01,
0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0xb0, 0x01, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x92, 0x01, 0xfa, 0x42, 0x8e, 0x01, 0x72, 0x8b, 0x01,
0x32, 0x85, 0x01, 0x5e, 0x28, 0x6d, 0x64, 0x35, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46,
0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x31, 0x3a, 0x5b, 0x61,
0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x7c, 0x73, 0x68,
0x61, 0x32, 0x35, 0x36, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d,
0x7b, 0x36, 0x34, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x3a, 0x5b, 0x61, 0x2d, 0x66,
0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31, 0x32, 0x38, 0x7d, 0x7c, 0x62, 0x6c, 0x61,
0x6b, 0x65, 0x33, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b,
0x36, 0x34, 0x7d, 0x7c, 0x63, 0x72, 0x63, 0x33, 0x32, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d,
0x46, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x06, 0x64,
0x69, 0x67, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x05, 0x72, 0x61, 0x6e,
0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e,
0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02,
0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12,
0x25, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69,
0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa,
0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74,
0x79, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x71, 0x75,
0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09,
0x52, 0x13, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44,
0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x69, 0x65,
0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x42,
0x0c, 0xfa, 0x42, 0x09, 0x32, 0x07, 0x28, 0x80, 0x80, 0x80, 0x02, 0x40, 0x01, 0x48, 0x04, 0x52,
0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12,
0x30, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01,
0x48, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12,
0x30, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48,
0x02, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x88, 0x01,
0x01, 0x12, 0x38, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f,
0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b,
0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0d, 0x73,
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x04,
0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x38, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72,
0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x05, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x0e, 0x70,
0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48,
0x06, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c,
0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f,
0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a,
0x12, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x63,
0x72, 0x65, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72,
0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x57, 0x0a, 0x04,
0x48, 0x44, 0x46, 0x53, 0x12, 0x3a, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65,
0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01,
0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x35, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73,
0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbe, 0x04, 0x0a,
0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c,
0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52,
0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06,
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04,
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0xab, 0x01, 0x0a,
0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x92, 0x01,
0xfa, 0x42, 0x8e, 0x01, 0x72, 0x8b, 0x01, 0x32, 0x85, 0x01, 0x5e, 0x28, 0x6d, 0x64, 0x35, 0x3a,
0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x7c,
0x73, 0x68, 0x61, 0x31, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d,
0x7b, 0x34, 0x30, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x3a, 0x5b, 0x61, 0x2d, 0x66,
0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x35,
0x31, 0x32, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31,
0x32, 0x38, 0x7d, 0x7c, 0x62, 0x6c, 0x61, 0x6b, 0x65, 0x33, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41,
0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x7c, 0x63, 0x72, 0x63, 0x33, 0x32,
0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x24, 0xd0,
0x01, 0x01, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x09, 0xfa, 0x42, 0x06,
0x7a, 0x04, 0x10, 0x01, 0x70, 0x01, 0x48, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79,
0x70, 0x65, 0x48, 0x02, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70,
0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01,
0x48, 0x05, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01,
0x01, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa,
0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x43, 0x0a,
0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xfa,
0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d,
0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 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, 0x49, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c,
0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a,
0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10,
0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x41, 0x43, 0x48, 0x45,
0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x41, 0x43, 0x48, 0x45, 0x10, 0x03, 0x2a, 0x42, 0x0a,
0x0b, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e,
0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00,
0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10,
0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x50, 0x45, 0x45, 0x52, 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, 0x32, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x06, 0x52,
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x16, 0x64,
0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73,
0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x6f,
0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6e,
0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
0x2b, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63,
0x68, 0x61, 0x69, 0x6e, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x70, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x0e, 0x6f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a,
0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x48, 0x07, 0x52, 0x0d, 0x6f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28,
0x0a, 0x04, 0x68, 0x64, 0x66, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x44, 0x46, 0x53, 0x48, 0x08, 0x52,
0x04, 0x68, 0x64, 0x66, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x70,
0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69,
0x73, 0x50, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x65,
0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x1f, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69,
0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09,
0x48, 0x09, 0x52, 0x1b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x61,
0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x88,
0x01, 0x01, 0x12, 0x2c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18,
0x16, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x70, 0x01, 0xd0, 0x01,
0x01, 0x48, 0x0a, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x88, 0x01, 0x01,
0x1a, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x42, 0x08, 0x0a,
0x06, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x42,
0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x11, 0x0a, 0x0f,
0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42,
0x07, 0x0a, 0x05, 0x5f, 0x68, 0x64, 0x66, 0x73, 0x42, 0x22, 0x0a, 0x20, 0x5f, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61,
0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a,
0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x22, 0xf2, 0x03, 0x0a, 0x0d, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x06,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42,
0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
0xd0, 0x01, 0x01, 0x48, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88,
0x01, 0x01, 0x12, 0x30, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79,
0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
0x10, 0x01, 0x48, 0x02, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49,
0x64, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b,
0x65, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65,
0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x34,
0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01,
0x01, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa,
0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x05, 0x52, 0x0e, 0x63, 0x72, 0x65,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x36,
0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0,
0x01, 0x01, 0x48, 0x06, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,
0x41, 0x63, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x10,
0x0a, 0x0e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64,
0x42, 0x14, 0x0a, 0x12, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f,
0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x72, 0x65,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x11, 0x0a, 0x0f,
0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x22,
0x57, 0x0a, 0x04, 0x48, 0x44, 0x46, 0x53, 0x12, 0x3a, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52,
0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x35, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22,
0xbe, 0x04, 0x0a, 0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01,
0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12,
0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12,
0xab, 0x01, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x42, 0x92, 0x01, 0xfa, 0x42, 0x8e, 0x01, 0x72, 0x8b, 0x01, 0x32, 0x85, 0x01, 0x5e, 0x28, 0x6d,
0x64, 0x35, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x33,
0x32, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x31, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30,
0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x7c, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x3a, 0x5b,
0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x7c, 0x73,
0x68, 0x61, 0x35, 0x31, 0x32, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39,
0x5d, 0x7b, 0x31, 0x32, 0x38, 0x7d, 0x7c, 0x62, 0x6c, 0x61, 0x6b, 0x65, 0x33, 0x3a, 0x5b, 0x61,
0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x7c, 0x63, 0x72,
0x63, 0x33, 0x32, 0x3a, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x2b,
0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x09,
0xfa, 0x42, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x70, 0x01, 0x48, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66,
0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69,
0x63, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,
0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74,
0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x42, 0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42,
0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65,
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, 0x49, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70,
0x65, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x00, 0x12,
0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12,
0x14, 0x0a, 0x10, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x41,
0x43, 0x48, 0x45, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x41, 0x43, 0x48, 0x45, 0x10, 0x03,
0x2a, 0x42, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12,
0x12, 0x0a, 0x0e, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43,
0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x45,
0x45, 0x52, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x50, 0x45,
0x45, 0x52, 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, 0x32, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -3345,7 +3686,7 @@ func file_pkg_apis_common_v2_common_proto_rawDescGZIP() []byte {
}
var file_pkg_apis_common_v2_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_pkg_apis_common_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
var file_pkg_apis_common_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
var file_pkg_apis_common_v2_common_proto_goTypes = []interface{}{
(SizeScope)(0), // 0: common.v2.SizeScope
(TaskType)(0), // 1: common.v2.TaskType
@ -3365,74 +3706,83 @@ var file_pkg_apis_common_v2_common_proto_goTypes = []interface{}{
(*Disk)(nil), // 15: common.v2.Disk
(*Build)(nil), // 16: common.v2.Build
(*Download)(nil), // 17: common.v2.Download
(*ObjectStorage)(nil), // 18: common.v2.ObjectStorage
(*HDFS)(nil), // 19: common.v2.HDFS
(*Range)(nil), // 20: common.v2.Range
(*Piece)(nil), // 21: common.v2.Piece
nil, // 22: common.v2.Task.RequestHeaderEntry
nil, // 23: common.v2.CacheTask.RequestHeaderEntry
nil, // 24: common.v2.Download.RequestHeaderEntry
(*durationpb.Duration)(nil), // 25: google.protobuf.Duration
(*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp
(*CacheDownload)(nil), // 18: common.v2.CacheDownload
(*ObjectStorage)(nil), // 19: common.v2.ObjectStorage
(*HDFS)(nil), // 20: common.v2.HDFS
(*Range)(nil), // 21: common.v2.Range
(*Piece)(nil), // 22: common.v2.Piece
nil, // 23: common.v2.Task.RequestHeaderEntry
nil, // 24: common.v2.CacheTask.RequestHeaderEntry
nil, // 25: common.v2.Download.RequestHeaderEntry
nil, // 26: common.v2.CacheDownload.RequestHeaderEntry
(*durationpb.Duration)(nil), // 27: google.protobuf.Duration
(*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp
}
var file_pkg_apis_common_v2_common_proto_depIdxs = []int32{
20, // 0: common.v2.Peer.range:type_name -> common.v2.Range
21, // 0: common.v2.Peer.range:type_name -> common.v2.Range
3, // 1: common.v2.Peer.priority:type_name -> common.v2.Priority
21, // 2: common.v2.Peer.pieces:type_name -> common.v2.Piece
25, // 3: common.v2.Peer.cost:type_name -> google.protobuf.Duration
22, // 2: common.v2.Peer.pieces:type_name -> common.v2.Piece
27, // 3: common.v2.Peer.cost:type_name -> google.protobuf.Duration
7, // 4: common.v2.Peer.task:type_name -> common.v2.Task
10, // 5: common.v2.Peer.host:type_name -> common.v2.Host
26, // 6: common.v2.Peer.created_at:type_name -> google.protobuf.Timestamp
26, // 7: common.v2.Peer.updated_at:type_name -> google.protobuf.Timestamp
20, // 8: common.v2.CachePeer.range:type_name -> common.v2.Range
28, // 6: common.v2.Peer.created_at:type_name -> google.protobuf.Timestamp
28, // 7: common.v2.Peer.updated_at:type_name -> google.protobuf.Timestamp
21, // 8: common.v2.CachePeer.range:type_name -> common.v2.Range
3, // 9: common.v2.CachePeer.priority:type_name -> common.v2.Priority
21, // 10: common.v2.CachePeer.pieces:type_name -> common.v2.Piece
25, // 11: common.v2.CachePeer.cost:type_name -> google.protobuf.Duration
22, // 10: common.v2.CachePeer.pieces:type_name -> common.v2.Piece
27, // 11: common.v2.CachePeer.cost:type_name -> google.protobuf.Duration
8, // 12: common.v2.CachePeer.task:type_name -> common.v2.CacheTask
10, // 13: common.v2.CachePeer.host:type_name -> common.v2.Host
26, // 14: common.v2.CachePeer.created_at:type_name -> google.protobuf.Timestamp
26, // 15: common.v2.CachePeer.updated_at:type_name -> google.protobuf.Timestamp
25, // 16: common.v2.PersistentCachePeer.cost:type_name -> google.protobuf.Duration
28, // 14: common.v2.CachePeer.created_at:type_name -> google.protobuf.Timestamp
28, // 15: common.v2.CachePeer.updated_at:type_name -> google.protobuf.Timestamp
27, // 16: common.v2.PersistentCachePeer.cost:type_name -> google.protobuf.Duration
9, // 17: common.v2.PersistentCachePeer.task:type_name -> common.v2.PersistentCacheTask
10, // 18: common.v2.PersistentCachePeer.host:type_name -> common.v2.Host
26, // 19: common.v2.PersistentCachePeer.created_at:type_name -> google.protobuf.Timestamp
26, // 20: common.v2.PersistentCachePeer.updated_at:type_name -> google.protobuf.Timestamp
28, // 19: common.v2.PersistentCachePeer.created_at:type_name -> google.protobuf.Timestamp
28, // 20: common.v2.PersistentCachePeer.updated_at:type_name -> google.protobuf.Timestamp
1, // 21: common.v2.Task.type:type_name -> common.v2.TaskType
22, // 22: common.v2.Task.request_header:type_name -> common.v2.Task.RequestHeaderEntry
23, // 22: common.v2.Task.request_header:type_name -> common.v2.Task.RequestHeaderEntry
0, // 23: common.v2.Task.size_scope:type_name -> common.v2.SizeScope
21, // 24: common.v2.Task.pieces:type_name -> common.v2.Piece
26, // 25: common.v2.Task.created_at:type_name -> google.protobuf.Timestamp
26, // 26: common.v2.Task.updated_at:type_name -> google.protobuf.Timestamp
22, // 24: common.v2.Task.pieces:type_name -> common.v2.Piece
28, // 25: common.v2.Task.created_at:type_name -> google.protobuf.Timestamp
28, // 26: common.v2.Task.updated_at:type_name -> google.protobuf.Timestamp
1, // 27: common.v2.CacheTask.type:type_name -> common.v2.TaskType
23, // 28: common.v2.CacheTask.request_header:type_name -> common.v2.CacheTask.RequestHeaderEntry
24, // 28: common.v2.CacheTask.request_header:type_name -> common.v2.CacheTask.RequestHeaderEntry
0, // 29: common.v2.CacheTask.size_scope:type_name -> common.v2.SizeScope
21, // 30: common.v2.CacheTask.pieces:type_name -> common.v2.Piece
26, // 31: common.v2.CacheTask.created_at:type_name -> google.protobuf.Timestamp
26, // 32: common.v2.CacheTask.updated_at:type_name -> google.protobuf.Timestamp
25, // 33: common.v2.PersistentCacheTask.ttl:type_name -> google.protobuf.Duration
26, // 34: common.v2.PersistentCacheTask.created_at:type_name -> google.protobuf.Timestamp
26, // 35: common.v2.PersistentCacheTask.updated_at:type_name -> google.protobuf.Timestamp
22, // 30: common.v2.CacheTask.pieces:type_name -> common.v2.Piece
28, // 31: common.v2.CacheTask.created_at:type_name -> google.protobuf.Timestamp
28, // 32: common.v2.CacheTask.updated_at:type_name -> google.protobuf.Timestamp
27, // 33: common.v2.PersistentCacheTask.ttl:type_name -> google.protobuf.Duration
28, // 34: common.v2.PersistentCacheTask.created_at:type_name -> google.protobuf.Timestamp
28, // 35: common.v2.PersistentCacheTask.updated_at:type_name -> google.protobuf.Timestamp
11, // 36: common.v2.Host.cpu:type_name -> common.v2.CPU
13, // 37: common.v2.Host.memory:type_name -> common.v2.Memory
14, // 38: common.v2.Host.network:type_name -> common.v2.Network
15, // 39: common.v2.Host.disk:type_name -> common.v2.Disk
16, // 40: common.v2.Host.build:type_name -> common.v2.Build
12, // 41: common.v2.CPU.times:type_name -> common.v2.CPUTimes
20, // 42: common.v2.Download.range:type_name -> common.v2.Range
21, // 42: common.v2.Download.range:type_name -> common.v2.Range
1, // 43: common.v2.Download.type:type_name -> common.v2.TaskType
3, // 44: common.v2.Download.priority:type_name -> common.v2.Priority
24, // 45: common.v2.Download.request_header:type_name -> common.v2.Download.RequestHeaderEntry
25, // 46: common.v2.Download.timeout:type_name -> google.protobuf.Duration
18, // 47: common.v2.Download.object_storage:type_name -> common.v2.ObjectStorage
19, // 48: common.v2.Download.hdfs:type_name -> common.v2.HDFS
2, // 49: common.v2.Piece.traffic_type:type_name -> common.v2.TrafficType
25, // 50: common.v2.Piece.cost:type_name -> google.protobuf.Duration
26, // 51: common.v2.Piece.created_at:type_name -> google.protobuf.Timestamp
52, // [52:52] is the sub-list for method output_type
52, // [52:52] is the sub-list for method input_type
52, // [52:52] is the sub-list for extension type_name
52, // [52:52] is the sub-list for extension extendee
0, // [0:52] is the sub-list for field type_name
25, // 45: common.v2.Download.request_header:type_name -> common.v2.Download.RequestHeaderEntry
27, // 46: common.v2.Download.timeout:type_name -> google.protobuf.Duration
19, // 47: common.v2.Download.object_storage:type_name -> common.v2.ObjectStorage
20, // 48: common.v2.Download.hdfs:type_name -> common.v2.HDFS
21, // 49: common.v2.CacheDownload.range:type_name -> common.v2.Range
1, // 50: common.v2.CacheDownload.type:type_name -> common.v2.TaskType
3, // 51: common.v2.CacheDownload.priority:type_name -> common.v2.Priority
26, // 52: common.v2.CacheDownload.request_header:type_name -> common.v2.CacheDownload.RequestHeaderEntry
27, // 53: common.v2.CacheDownload.timeout:type_name -> google.protobuf.Duration
19, // 54: common.v2.CacheDownload.object_storage:type_name -> common.v2.ObjectStorage
20, // 55: common.v2.CacheDownload.hdfs:type_name -> common.v2.HDFS
2, // 56: common.v2.Piece.traffic_type:type_name -> common.v2.TrafficType
27, // 57: common.v2.Piece.cost:type_name -> google.protobuf.Duration
28, // 58: common.v2.Piece.created_at:type_name -> google.protobuf.Timestamp
59, // [59:59] is the sub-list for method output_type
59, // [59:59] is the sub-list for method input_type
59, // [59:59] is the sub-list for extension type_name
59, // [59:59] is the sub-list for extension extendee
0, // [0:59] is the sub-list for field type_name
}
func init() { file_pkg_apis_common_v2_common_proto_init() }
@ -3610,7 +3960,7 @@ func file_pkg_apis_common_v2_common_proto_init() {
}
}
file_pkg_apis_common_v2_common_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ObjectStorage); i {
switch v := v.(*CacheDownload); i {
case 0:
return &v.state
case 1:
@ -3622,7 +3972,7 @@ func file_pkg_apis_common_v2_common_proto_init() {
}
}
file_pkg_apis_common_v2_common_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HDFS); i {
switch v := v.(*ObjectStorage); i {
case 0:
return &v.state
case 1:
@ -3634,7 +3984,7 @@ func file_pkg_apis_common_v2_common_proto_init() {
}
}
file_pkg_apis_common_v2_common_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Range); i {
switch v := v.(*HDFS); i {
case 0:
return &v.state
case 1:
@ -3646,6 +3996,18 @@ func file_pkg_apis_common_v2_common_proto_init() {
}
}
file_pkg_apis_common_v2_common_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Range); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_apis_common_v2_common_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Piece); i {
case 0:
return &v.state
@ -3670,14 +4032,15 @@ func file_pkg_apis_common_v2_common_proto_init() {
file_pkg_apis_common_v2_common_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_pkg_apis_common_v2_common_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_pkg_apis_common_v2_common_proto_msgTypes[15].OneofWrappers = []interface{}{}
file_pkg_apis_common_v2_common_proto_msgTypes[17].OneofWrappers = []interface{}{}
file_pkg_apis_common_v2_common_proto_msgTypes[16].OneofWrappers = []interface{}{}
file_pkg_apis_common_v2_common_proto_msgTypes[18].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_apis_common_v2_common_proto_rawDesc,
NumEnums: 4,
NumMessages: 21,
NumMessages: 23,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -3240,6 +3240,383 @@ var _ interface {
var _Download_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 CacheDownload 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 *CacheDownload) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CacheDownload 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 CacheDownloadMultiError, or
// nil if none found.
func (m *CacheDownload) ValidateAll() error {
return m.validate(true)
}
func (m *CacheDownload) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if uri, err := url.Parse(m.GetUrl()); err != nil {
err = CacheDownloadValidationError{
field: "Url",
reason: "value must be a valid URI",
cause: err,
}
if !all {
return err
}
errors = append(errors, err)
} else if !uri.IsAbs() {
err := CacheDownloadValidationError{
field: "Url",
reason: "value must be absolute",
}
if !all {
return err
}
errors = append(errors, err)
}
if _, ok := TaskType_name[int32(m.GetType())]; !ok {
err := CacheDownloadValidationError{
field: "Type",
reason: "value must be one of the defined enum values",
}
if !all {
return err
}
errors = append(errors, err)
}
if _, ok := Priority_name[int32(m.GetPriority())]; !ok {
err := CacheDownloadValidationError{
field: "Priority",
reason: "value must be one of the defined enum values",
}
if !all {
return err
}
errors = append(errors, err)
}
// no validation rules for RequestHeader
// no validation rules for DisableBackToSource
// no validation rules for NeedBackToSource
// no validation rules for Prefetch
// no validation rules for IsPrefetch
// no validation rules for NeedPieceContent
if m.Digest != nil {
if m.GetDigest() != "" {
if !_CacheDownload_Digest_Pattern.MatchString(m.GetDigest()) {
err := CacheDownloadValidationError{
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.Range != nil {
if all {
switch v := interface{}(m.GetRange()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "Range",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CacheDownloadValidationError{
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 CacheDownloadValidationError{
field: "Range",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if m.Tag != nil {
// no validation rules for Tag
}
if m.Application != nil {
// no validation rules for Application
}
if m.PieceLength != nil {
if m.GetPieceLength() != 0 {
if m.GetPieceLength() < 4194304 {
err := CacheDownloadValidationError{
field: "PieceLength",
reason: "value must be greater than or equal to 4194304",
}
if !all {
return err
}
errors = append(errors, err)
}
}
}
if m.OutputPath != nil {
if m.GetOutputPath() != "" {
if utf8.RuneCountInString(m.GetOutputPath()) < 1 {
err := CacheDownloadValidationError{
field: "OutputPath",
reason: "value length must be at least 1 runes",
}
if !all {
return err
}
errors = append(errors, err)
}
}
}
if m.Timeout != nil {
if all {
switch v := interface{}(m.GetTimeout()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "Timeout",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "Timeout",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CacheDownloadValidationError{
field: "Timeout",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if m.ObjectStorage != nil {
if all {
switch v := interface{}(m.GetObjectStorage()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "ObjectStorage",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "ObjectStorage",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetObjectStorage()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CacheDownloadValidationError{
field: "ObjectStorage",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if m.Hdfs != nil {
if all {
switch v := interface{}(m.GetHdfs()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "Hdfs",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, CacheDownloadValidationError{
field: "Hdfs",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetHdfs()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CacheDownloadValidationError{
field: "Hdfs",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if m.ContentForCalculatingTaskId != nil {
// no validation rules for ContentForCalculatingTaskId
}
if m.RemoteIp != nil {
if m.GetRemoteIp() != "" {
if ip := net.ParseIP(m.GetRemoteIp()); ip == nil {
err := CacheDownloadValidationError{
field: "RemoteIp",
reason: "value must be a valid IP address",
}
if !all {
return err
}
errors = append(errors, err)
}
}
}
if len(errors) > 0 {
return CacheDownloadMultiError(errors)
}
return nil
}
// CacheDownloadMultiError is an error wrapping multiple validation errors
// returned by CacheDownload.ValidateAll() if the designated constraints
// aren't met.
type CacheDownloadMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CacheDownloadMultiError) 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 CacheDownloadMultiError) AllErrors() []error { return m }
// CacheDownloadValidationError is the validation error returned by
// CacheDownload.Validate if the designated constraints aren't met.
type CacheDownloadValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CacheDownloadValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CacheDownloadValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CacheDownloadValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CacheDownloadValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CacheDownloadValidationError) ErrorName() string { return "CacheDownloadValidationError" }
// Error satisfies the builtin error interface
func (e CacheDownloadValidationError) 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 %sCacheDownload.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CacheDownloadValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CacheDownloadValidationError{}
var _CacheDownload_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 ObjectStorage 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.

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.
@ -63,8 +63,11 @@ enum TaskType {
// 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 import file and export file in P2P cluster.
// When the cache task is imported into the P2P cluster, dfdaemon will download the cache task from the cache of remote peer.
// 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;
}
@ -524,10 +527,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;
@ -544,6 +543,67 @@ message Download {
reserved "load_to_cache";
}
// CacheDownload information.
message CacheDownload {
// 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 Range range = 3;
// Task type.
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.
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 ObjectStorage object_storage = 17;
// HDFS protocol information.
optional 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}];
}
// Object Storage related information.
message ObjectStorage {
// Region is the region of the object storage service.

File diff suppressed because it is too large Load Diff

View File

@ -170,7 +170,7 @@ message DeleteTaskRequest {
// DownloadCacheTaskRequest represents request of DownloadCacheTask.
message DownloadCacheTaskRequest {
// Download information.
common.v2.Download download = 1 [(validate.rules).message.required = true];
common.v2.CacheDownload download = 1 [(validate.rules).message.required = true];
}
// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.

File diff suppressed because it is too large Load Diff

View File

@ -227,7 +227,7 @@ message DeleteHostRequest{
// RegisterCachePeerRequest represents cache peer registered request of AnnounceCachePeerRequest.
message RegisterCachePeerRequest {
// Download information.
common.v2.Download download = 1 [(validate.rules).message.required = true];
common.v2.CacheDownload download = 1 [(validate.rules).message.required = true];
}
// DownloadCachePeerStartedRequest represents cache peer download started request of AnnounceCachePeerRequest.

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.
@ -57,8 +57,11 @@ enum TaskType {
// 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 import file and export file in P2P cluster.
// When the cache task is imported into the P2P cluster, dfdaemon will download the cache task from the cache of remote peer.
// 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;
}
@ -518,10 +521,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;
@ -538,6 +537,67 @@ message Download {
reserved "load_to_cache";
}
// CacheDownload information.
message CacheDownload {
// 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 Range range = 3;
// Task type.
TaskType type = 4;
// URL tag identifies different task for same url.
optional string tag = 5;
// Application of task.
optional string application = 6;
// Peer priority.
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 ObjectStorage object_storage = 17;
// HDFS protocol information.
optional 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;
}
// Object Storage related information.
message ObjectStorage {
// Region is the region of the object storage service.

View File

@ -165,7 +165,7 @@ message DeleteTaskRequest {
// DownloadCacheTaskRequest represents request of DownloadCacheTask.
message DownloadCacheTaskRequest {
// Download information.
common.v2.Download download = 1;
common.v2.CacheDownload download = 1;
}
// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.

View File

@ -218,7 +218,7 @@ message DeleteHostRequest{
// RegisterCachePeerRequest represents cache peer registered request of AnnounceCachePeerRequest.
message RegisterCachePeerRequest {
// Download information.
common.v2.Download download = 1;
common.v2.CacheDownload download = 1;
}
// DownloadCachePeerStartedRequest represents cache peer download started request of AnnounceCachePeerRequest.

View File

@ -604,10 +604,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.
/// 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.>
#[prost(bool, tag = "22")]
@ -625,6 +621,96 @@ pub struct Download {
#[prost(string, optional, tag = "24")]
pub remote_ip: ::core::option::Option<::prost::alloc::string::String>,
}
/// CacheDownload information.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheDownload {
/// 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<Range>,
/// Task type.
#[prost(enumeration = "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 = "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<ObjectStorage>,
/// HDFS protocol information.
#[prost(message, optional, tag = "18")]
pub hdfs: ::core::option::Option<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>,
}
/// Object Storage related information.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
@ -753,7 +839,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
@ -765,8 +851,11 @@ 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 import file and export file in P2P cluster.
/// When the cache task is imported into the P2P cluster, dfdaemon will download the cache task from the cache of remote peer.
/// 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 {

Binary file not shown.

View File

@ -226,7 +226,7 @@ pub struct DeleteTaskRequest {
pub struct DownloadCacheTaskRequest {
/// Download information.
#[prost(message, optional, tag = "1")]
pub download: ::core::option::Option<super::super::common::v2::Download>,
pub download: ::core::option::Option<super::super::common::v2::CacheDownload>,
}
/// DownloadCacheTaskStartedResponse represents cache task download started response of DownloadCacheTaskResponse.
#[derive(serde::Serialize, serde::Deserialize)]

View File

@ -336,7 +336,7 @@ pub struct DeleteHostRequest {
pub struct RegisterCachePeerRequest {
/// Download information.
#[prost(message, optional, tag = "1")]
pub download: ::core::option::Option<super::super::common::v2::Download>,
pub download: ::core::option::Option<super::super::common::v2::CacheDownload>,
}
/// DownloadCachePeerStartedRequest represents cache peer download started request of AnnounceCachePeerRequest.
#[derive(serde::Serialize, serde::Deserialize)]