-
Notifications
You must be signed in to change notification settings - Fork 6
/
common.pb.go
2309 lines (2072 loc) · 82.2 KB
/
common.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Copyright 2022 The Dragonfly Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: pkg/apis/common/v2/common.proto
package common
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// SizeScope represents size scope of task.
type SizeScope int32
const (
// NORMAL task has pieces is more than one piece.
SizeScope_NORMAL SizeScope = 0
// SMALL task's content length is more than 128 byte and has only one piece.
SizeScope_SMALL SizeScope = 1
// TINY task's content length is less than 128 byte.
SizeScope_TINY SizeScope = 2
// EMPTY task's content length is equal to zero.
SizeScope_EMPTY SizeScope = 3
// UNKNOW task has invalid size scope.
SizeScope_UNKNOW SizeScope = 4
)
// Enum value maps for SizeScope.
var (
SizeScope_name = map[int32]string{
0: "NORMAL",
1: "SMALL",
2: "TINY",
3: "EMPTY",
4: "UNKNOW",
}
SizeScope_value = map[string]int32{
"NORMAL": 0,
"SMALL": 1,
"TINY": 2,
"EMPTY": 3,
"UNKNOW": 4,
}
)
func (x SizeScope) Enum() *SizeScope {
p := new(SizeScope)
*p = x
return p
}
func (x SizeScope) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SizeScope) Descriptor() protoreflect.EnumDescriptor {
return file_pkg_apis_common_v2_common_proto_enumTypes[0].Descriptor()
}
func (SizeScope) Type() protoreflect.EnumType {
return &file_pkg_apis_common_v2_common_proto_enumTypes[0]
}
func (x SizeScope) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SizeScope.Descriptor instead.
func (SizeScope) EnumDescriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{0}
}
// TaskType represents type of task.
type TaskType int32
const (
// DFDAEMON is dfdeamon type of task,
// dfdeamon task is a normal p2p task.
TaskType_DFDAEMON TaskType = 0
// DFCACHE is dfcache type of task,
// dfcache task is a cache task, and the task url is fake url.
// It can only be used for caching and cannot be downloaded back to source.
TaskType_DFCACHE TaskType = 1
// DFSTORE is dfstore type of task,
// dfstore task is a persistent task in backend.
TaskType_DFSTORE TaskType = 2
)
// Enum value maps for TaskType.
var (
TaskType_name = map[int32]string{
0: "DFDAEMON",
1: "DFCACHE",
2: "DFSTORE",
}
TaskType_value = map[string]int32{
"DFDAEMON": 0,
"DFCACHE": 1,
"DFSTORE": 2,
}
)
func (x TaskType) Enum() *TaskType {
p := new(TaskType)
*p = x
return p
}
func (x TaskType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TaskType) Descriptor() protoreflect.EnumDescriptor {
return file_pkg_apis_common_v2_common_proto_enumTypes[1].Descriptor()
}
func (TaskType) Type() protoreflect.EnumType {
return &file_pkg_apis_common_v2_common_proto_enumTypes[1]
}
func (x TaskType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TaskType.Descriptor instead.
func (TaskType) EnumDescriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{1}
}
// TrafficType represents type of traffic.
type TrafficType int32
const (
// BACK_TO_SOURCE is to download traffic from the source.
TrafficType_BACK_TO_SOURCE TrafficType = 0
// REMOTE_PEER is to download traffic from the remote peer.
TrafficType_REMOTE_PEER TrafficType = 1
// LOCAL_PEER is to download traffic from the local peer.
TrafficType_LOCAL_PEER TrafficType = 2
)
// Enum value maps for TrafficType.
var (
TrafficType_name = map[int32]string{
0: "BACK_TO_SOURCE",
1: "REMOTE_PEER",
2: "LOCAL_PEER",
}
TrafficType_value = map[string]int32{
"BACK_TO_SOURCE": 0,
"REMOTE_PEER": 1,
"LOCAL_PEER": 2,
}
)
func (x TrafficType) Enum() *TrafficType {
p := new(TrafficType)
*p = x
return p
}
func (x TrafficType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TrafficType) Descriptor() protoreflect.EnumDescriptor {
return file_pkg_apis_common_v2_common_proto_enumTypes[2].Descriptor()
}
func (TrafficType) Type() protoreflect.EnumType {
return &file_pkg_apis_common_v2_common_proto_enumTypes[2]
}
func (x TrafficType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TrafficType.Descriptor instead.
func (TrafficType) EnumDescriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{2}
}
// Priority represents priority of application.
type Priority int32
const (
// LEVEL0 has no special meaning for scheduler.
Priority_LEVEL0 Priority = 0
// LEVEL1 represents the download task is forbidden,
// and an error code is returned during the registration.
Priority_LEVEL1 Priority = 1
// LEVEL2 represents when the task is downloaded for the first time,
// allow peers to download from the other peers,
// but not back-to-source. When the task is not downloaded for
// the first time, it is scheduled normally.
Priority_LEVEL2 Priority = 2
// LEVEL3 represents when the task is downloaded for the first time,
// the normal peer is first to download back-to-source.
// When the task is not downloaded for the first time, it is scheduled normally.
Priority_LEVEL3 Priority = 3
// LEVEL4 represents when the task is downloaded for the first time,
// the weak peer is first triggered to back-to-source.
// When the task is not downloaded for the first time, it is scheduled normally.
Priority_LEVEL4 Priority = 4
// LEVEL5 represents when the task is downloaded for the first time,
// the strong peer is first triggered to back-to-source.
// When the task is not downloaded for the first time, it is scheduled normally.
Priority_LEVEL5 Priority = 5
// LEVEL6 represents when the task is downloaded for the first time,
// the super peer is first triggered to back-to-source.
// When the task is not downloaded for the first time, it is scheduled normally.
Priority_LEVEL6 Priority = 6
)
// Enum value maps for Priority.
var (
Priority_name = map[int32]string{
0: "LEVEL0",
1: "LEVEL1",
2: "LEVEL2",
3: "LEVEL3",
4: "LEVEL4",
5: "LEVEL5",
6: "LEVEL6",
}
Priority_value = map[string]int32{
"LEVEL0": 0,
"LEVEL1": 1,
"LEVEL2": 2,
"LEVEL3": 3,
"LEVEL4": 4,
"LEVEL5": 5,
"LEVEL6": 6,
}
)
func (x Priority) Enum() *Priority {
p := new(Priority)
*p = x
return p
}
func (x Priority) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Priority) Descriptor() protoreflect.EnumDescriptor {
return file_pkg_apis_common_v2_common_proto_enumTypes[3].Descriptor()
}
func (Priority) Type() protoreflect.EnumType {
return &file_pkg_apis_common_v2_common_proto_enumTypes[3]
}
func (x Priority) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Priority.Descriptor instead.
func (Priority) EnumDescriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{3}
}
// Peer metadata.
type Peer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Peer id.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Range is url range of request.
Range *Range `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"`
// Peer priority.
Priority Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=common.v2.Priority" json:"priority,omitempty"`
// Pieces of peer.
Pieces []*Piece `protobuf:"bytes,4,rep,name=pieces,proto3" json:"pieces,omitempty"`
// Peer downloads costs time.
Cost *durationpb.Duration `protobuf:"bytes,5,opt,name=cost,proto3" json:"cost,omitempty"`
// Peer state.
State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
// Task info.
Task *Task `protobuf:"bytes,7,opt,name=task,proto3" json:"task,omitempty"`
// Host info.
Host *Host `protobuf:"bytes,8,opt,name=host,proto3" json:"host,omitempty"`
// NeedBackToSource needs downloaded from source.
NeedBackToSource bool `protobuf:"varint,9,opt,name=need_back_to_source,json=needBackToSource,proto3" json:"need_back_to_source,omitempty"`
// Peer create time.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Peer update time.
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
}
func (x *Peer) Reset() {
*x = Peer{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Peer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Peer) ProtoMessage() {}
func (x *Peer) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[0]
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 Peer.ProtoReflect.Descriptor instead.
func (*Peer) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{0}
}
func (x *Peer) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Peer) GetRange() *Range {
if x != nil {
return x.Range
}
return nil
}
func (x *Peer) GetPriority() Priority {
if x != nil {
return x.Priority
}
return Priority_LEVEL0
}
func (x *Peer) GetPieces() []*Piece {
if x != nil {
return x.Pieces
}
return nil
}
func (x *Peer) GetCost() *durationpb.Duration {
if x != nil {
return x.Cost
}
return nil
}
func (x *Peer) GetState() string {
if x != nil {
return x.State
}
return ""
}
func (x *Peer) GetTask() *Task {
if x != nil {
return x.Task
}
return nil
}
func (x *Peer) GetHost() *Host {
if x != nil {
return x.Host
}
return nil
}
func (x *Peer) GetNeedBackToSource() bool {
if x != nil {
return x.NeedBackToSource
}
return false
}
func (x *Peer) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *Peer) GetUpdatedAt() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedAt
}
return nil
}
// Task metadata.
type Task struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Task id.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Task type.
Type TaskType `protobuf:"varint,2,opt,name=type,proto3,enum=common.v2.TaskType" json:"type,omitempty"`
// Download url.
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
// Digest of the pieces digest, for example md5:xxx or sha256:yyy.
Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"`
// URL tag identifies different task for same url.
Tag string `protobuf:"bytes,5,opt,name=tag,proto3" json:"tag,omitempty"`
// Application of task.
Application string `protobuf:"bytes,6,opt,name=application,proto3" json:"application,omitempty"`
// Filter url used to generate task id.
Filters []string `protobuf:"bytes,7,rep,name=filters,proto3" json:"filters,omitempty"`
// Task request headers.
Header map[string]string `protobuf:"bytes,8,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Task piece length.
PieceLength int32 `protobuf:"varint,9,opt,name=piece_length,json=pieceLength,proto3" json:"piece_length,omitempty"`
// Task content length.
ContentLength int64 `protobuf:"varint,10,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
// Task piece count.
PieceCount int32 `protobuf:"varint,11,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
// Task size scope.
SizeScope SizeScope `protobuf:"varint,12,opt,name=size_scope,json=sizeScope,proto3,enum=common.v2.SizeScope" json:"size_scope,omitempty"`
// Pieces of task.
Pieces []*Piece `protobuf:"bytes,13,rep,name=pieces,proto3" json:"pieces,omitempty"`
// Task state.
State string `protobuf:"bytes,14,opt,name=state,proto3" json:"state,omitempty"`
// Task peer count.
PeerCount int32 `protobuf:"varint,15,opt,name=peer_count,json=peerCount,proto3" json:"peer_count,omitempty"`
// Task contains available peer.
HasAvailablePeer bool `protobuf:"varint,16,opt,name=hasAvailablePeer,proto3" json:"hasAvailablePeer,omitempty"`
// Task create time.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Task update time.
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,18,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
}
func (x *Task) Reset() {
*x = Task{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Task) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Task) ProtoMessage() {}
func (x *Task) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[1]
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 Task.ProtoReflect.Descriptor instead.
func (*Task) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{1}
}
func (x *Task) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Task) GetType() TaskType {
if x != nil {
return x.Type
}
return TaskType_DFDAEMON
}
func (x *Task) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Task) GetDigest() string {
if x != nil {
return x.Digest
}
return ""
}
func (x *Task) GetTag() string {
if x != nil {
return x.Tag
}
return ""
}
func (x *Task) GetApplication() string {
if x != nil {
return x.Application
}
return ""
}
func (x *Task) GetFilters() []string {
if x != nil {
return x.Filters
}
return nil
}
func (x *Task) GetHeader() map[string]string {
if x != nil {
return x.Header
}
return nil
}
func (x *Task) GetPieceLength() int32 {
if x != nil {
return x.PieceLength
}
return 0
}
func (x *Task) GetContentLength() int64 {
if x != nil {
return x.ContentLength
}
return 0
}
func (x *Task) GetPieceCount() int32 {
if x != nil {
return x.PieceCount
}
return 0
}
func (x *Task) GetSizeScope() SizeScope {
if x != nil {
return x.SizeScope
}
return SizeScope_NORMAL
}
func (x *Task) GetPieces() []*Piece {
if x != nil {
return x.Pieces
}
return nil
}
func (x *Task) GetState() string {
if x != nil {
return x.State
}
return ""
}
func (x *Task) GetPeerCount() int32 {
if x != nil {
return x.PeerCount
}
return 0
}
func (x *Task) GetHasAvailablePeer() bool {
if x != nil {
return x.HasAvailablePeer
}
return false
}
func (x *Task) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *Task) GetUpdatedAt() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedAt
}
return nil
}
// Host metadata.
type Host struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Host id.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Host type.
Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
// Hostname.
Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Host ip.
Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
// Port of grpc service.
Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"`
// Port of download server.
DownloadPort int32 `protobuf:"varint,6,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"`
// Host OS.
Os string `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"`
// Host platform.
Platform string `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"`
// Host platform family.
PlatformFamily string `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
// Host platform version.
PlatformVersion string `protobuf:"bytes,10,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
// Host kernel version.
KernelVersion string `protobuf:"bytes,11,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"`
// CPU Stat.
Cpu *CPU `protobuf:"bytes,12,opt,name=cpu,proto3" json:"cpu,omitempty"`
// Memory Stat.
Memory *Memory `protobuf:"bytes,13,opt,name=memory,proto3" json:"memory,omitempty"`
// Network Stat.
Network *Network `protobuf:"bytes,14,opt,name=network,proto3" json:"network,omitempty"`
// Disk Stat.
Disk *Disk `protobuf:"bytes,15,opt,name=disk,proto3" json:"disk,omitempty"`
// Build information.
Build *Build `protobuf:"bytes,16,opt,name=build,proto3" json:"build,omitempty"`
}
func (x *Host) Reset() {
*x = Host{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Host) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Host) ProtoMessage() {}
func (x *Host) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[2]
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 Host.ProtoReflect.Descriptor instead.
func (*Host) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{2}
}
func (x *Host) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Host) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *Host) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *Host) GetIp() string {
if x != nil {
return x.Ip
}
return ""
}
func (x *Host) GetPort() int32 {
if x != nil {
return x.Port
}
return 0
}
func (x *Host) GetDownloadPort() int32 {
if x != nil {
return x.DownloadPort
}
return 0
}
func (x *Host) GetOs() string {
if x != nil {
return x.Os
}
return ""
}
func (x *Host) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *Host) GetPlatformFamily() string {
if x != nil {
return x.PlatformFamily
}
return ""
}
func (x *Host) GetPlatformVersion() string {
if x != nil {
return x.PlatformVersion
}
return ""
}
func (x *Host) GetKernelVersion() string {
if x != nil {
return x.KernelVersion
}
return ""
}
func (x *Host) GetCpu() *CPU {
if x != nil {
return x.Cpu
}
return nil
}
func (x *Host) GetMemory() *Memory {
if x != nil {
return x.Memory
}
return nil
}
func (x *Host) GetNetwork() *Network {
if x != nil {
return x.Network
}
return nil
}
func (x *Host) GetDisk() *Disk {
if x != nil {
return x.Disk
}
return nil
}
func (x *Host) GetBuild() *Build {
if x != nil {
return x.Build
}
return nil
}
// CPU Stat.
type CPU struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Number of logical cores in the system.
LogicalCount uint32 `protobuf:"varint,1,opt,name=logical_count,json=logicalCount,proto3" json:"logical_count,omitempty"`
// Number of physical cores in the system
PhysicalCount uint32 `protobuf:"varint,2,opt,name=physical_count,json=physicalCount,proto3" json:"physical_count,omitempty"`
// Percent calculates the percentage of cpu used.
Percent float64 `protobuf:"fixed64,3,opt,name=percent,proto3" json:"percent,omitempty"`
// Calculates the percentage of cpu used by process.
ProcessPercent float64 `protobuf:"fixed64,4,opt,name=process_percent,json=processPercent,proto3" json:"process_percent,omitempty"`
// CPUTimes contains the amounts of time the CPU has spent performing different kinds of work.
Times *CPUTimes `protobuf:"bytes,5,opt,name=times,proto3" json:"times,omitempty"`
}
func (x *CPU) Reset() {
*x = CPU{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CPU) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CPU) ProtoMessage() {}
func (x *CPU) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[3]
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 CPU.ProtoReflect.Descriptor instead.
func (*CPU) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{3}
}
func (x *CPU) GetLogicalCount() uint32 {
if x != nil {
return x.LogicalCount
}
return 0
}
func (x *CPU) GetPhysicalCount() uint32 {
if x != nil {
return x.PhysicalCount
}
return 0
}
func (x *CPU) GetPercent() float64 {
if x != nil {
return x.Percent
}
return 0
}
func (x *CPU) GetProcessPercent() float64 {
if x != nil {
return x.ProcessPercent
}
return 0
}
func (x *CPU) GetTimes() *CPUTimes {
if x != nil {
return x.Times
}
return nil
}
// CPUTimes contains the amounts of time the CPU has spent performing different
// kinds of work. Time units are in seconds.
type CPUTimes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// CPU time of user.
User float64 `protobuf:"fixed64,1,opt,name=user,proto3" json:"user,omitempty"`
// CPU time of system.
System float64 `protobuf:"fixed64,2,opt,name=system,proto3" json:"system,omitempty"`
// CPU time of idle.
Idle float64 `protobuf:"fixed64,3,opt,name=idle,proto3" json:"idle,omitempty"`
// CPU time of nice.
Nice float64 `protobuf:"fixed64,4,opt,name=nice,proto3" json:"nice,omitempty"`
// CPU time of iowait.
Iowait float64 `protobuf:"fixed64,5,opt,name=iowait,proto3" json:"iowait,omitempty"`
// CPU time of irq.
Irq float64 `protobuf:"fixed64,6,opt,name=irq,proto3" json:"irq,omitempty"`
// CPU time of softirq.
Softirq float64 `protobuf:"fixed64,7,opt,name=softirq,proto3" json:"softirq,omitempty"`
// CPU time of steal.
Steal float64 `protobuf:"fixed64,8,opt,name=steal,proto3" json:"steal,omitempty"`
// CPU time of guest.
Guest float64 `protobuf:"fixed64,9,opt,name=guest,proto3" json:"guest,omitempty"`
// CPU time of guest nice.
GuestNice float64 `protobuf:"fixed64,10,opt,name=guest_nice,json=guestNice,proto3" json:"guest_nice,omitempty"`
}
func (x *CPUTimes) Reset() {
*x = CPUTimes{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CPUTimes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CPUTimes) ProtoMessage() {}
func (x *CPUTimes) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_common_v2_common_proto_msgTypes[4]
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 CPUTimes.ProtoReflect.Descriptor instead.
func (*CPUTimes) Descriptor() ([]byte, []int) {
return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{4}
}
func (x *CPUTimes) GetUser() float64 {
if x != nil {
return x.User
}
return 0
}
func (x *CPUTimes) GetSystem() float64 {
if x != nil {
return x.System
}
return 0
}
func (x *CPUTimes) GetIdle() float64 {
if x != nil {
return x.Idle
}
return 0
}
func (x *CPUTimes) GetNice() float64 {
if x != nil {
return x.Nice
}
return 0
}
func (x *CPUTimes) GetIowait() float64 {
if x != nil {
return x.Iowait
}
return 0
}
func (x *CPUTimes) GetIrq() float64 {
if x != nil {