-
Notifications
You must be signed in to change notification settings - Fork 4
/
mesos.pb.go
3948 lines (3452 loc) · 121 KB
/
mesos.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
// Code generated by protoc-gen-go.
// source: mesos.proto
// DO NOT EDIT!
package mesosproto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// *
// Status is used to indicate the state of the scheduler and executor
// driver after function calls.
type Status int32
const (
Status_DRIVER_NOT_STARTED Status = 1
Status_DRIVER_RUNNING Status = 2
Status_DRIVER_ABORTED Status = 3
Status_DRIVER_STOPPED Status = 4
)
var Status_name = map[int32]string{
1: "DRIVER_NOT_STARTED",
2: "DRIVER_RUNNING",
3: "DRIVER_ABORTED",
4: "DRIVER_STOPPED",
}
var Status_value = map[string]int32{
"DRIVER_NOT_STARTED": 1,
"DRIVER_RUNNING": 2,
"DRIVER_ABORTED": 3,
"DRIVER_STOPPED": 4,
}
func (x Status) Enum() *Status {
p := new(Status)
*p = x
return p
}
func (x Status) String() string {
return proto.EnumName(Status_name, int32(x))
}
func (x *Status) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Status_value, data, "Status")
if err != nil {
return err
}
*x = Status(value)
return nil
}
// *
// Describes possible task states. IMPORTANT: Mesos assumes tasks that
// enter terminal states (see below) imply the task is no longer
// running and thus clean up any thing associated with the task
// (ultimately offering any resources being consumed by that task to
// another task).
type TaskState int32
const (
TaskState_TASK_STAGING TaskState = 6
TaskState_TASK_STARTING TaskState = 0
TaskState_TASK_RUNNING TaskState = 1
TaskState_TASK_FINISHED TaskState = 2
TaskState_TASK_FAILED TaskState = 3
TaskState_TASK_KILLED TaskState = 4
TaskState_TASK_LOST TaskState = 5
TaskState_TASK_ERROR TaskState = 7
)
var TaskState_name = map[int32]string{
6: "TASK_STAGING",
0: "TASK_STARTING",
1: "TASK_RUNNING",
2: "TASK_FINISHED",
3: "TASK_FAILED",
4: "TASK_KILLED",
5: "TASK_LOST",
7: "TASK_ERROR",
}
var TaskState_value = map[string]int32{
"TASK_STAGING": 6,
"TASK_STARTING": 0,
"TASK_RUNNING": 1,
"TASK_FINISHED": 2,
"TASK_FAILED": 3,
"TASK_KILLED": 4,
"TASK_LOST": 5,
"TASK_ERROR": 7,
}
func (x TaskState) Enum() *TaskState {
p := new(TaskState)
*p = x
return p
}
func (x TaskState) String() string {
return proto.EnumName(TaskState_name, int32(x))
}
func (x *TaskState) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TaskState_value, data, "TaskState")
if err != nil {
return err
}
*x = TaskState(value)
return nil
}
type FrameworkInfo_Capability_Type int32
const (
// Receive offers with revocable resources. See 'Resource'
// message for details.
// TODO(vinod): This is currently a no-op.
FrameworkInfo_Capability_REVOCABLE_RESOURCES FrameworkInfo_Capability_Type = 1
)
var FrameworkInfo_Capability_Type_name = map[int32]string{
1: "REVOCABLE_RESOURCES",
}
var FrameworkInfo_Capability_Type_value = map[string]int32{
"REVOCABLE_RESOURCES": 1,
}
func (x FrameworkInfo_Capability_Type) Enum() *FrameworkInfo_Capability_Type {
p := new(FrameworkInfo_Capability_Type)
*p = x
return p
}
func (x FrameworkInfo_Capability_Type) String() string {
return proto.EnumName(FrameworkInfo_Capability_Type_name, int32(x))
}
func (x *FrameworkInfo_Capability_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FrameworkInfo_Capability_Type_value, data, "FrameworkInfo_Capability_Type")
if err != nil {
return err
}
*x = FrameworkInfo_Capability_Type(value)
return nil
}
type Value_Type int32
const (
Value_SCALAR Value_Type = 0
Value_RANGES Value_Type = 1
Value_SET Value_Type = 2
Value_TEXT Value_Type = 3
)
var Value_Type_name = map[int32]string{
0: "SCALAR",
1: "RANGES",
2: "SET",
3: "TEXT",
}
var Value_Type_value = map[string]int32{
"SCALAR": 0,
"RANGES": 1,
"SET": 2,
"TEXT": 3,
}
func (x Value_Type) Enum() *Value_Type {
p := new(Value_Type)
*p = x
return p
}
func (x Value_Type) String() string {
return proto.EnumName(Value_Type_name, int32(x))
}
func (x *Value_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Value_Type_value, data, "Value_Type")
if err != nil {
return err
}
*x = Value_Type(value)
return nil
}
type Offer_Operation_Type int32
const (
Offer_Operation_LAUNCH Offer_Operation_Type = 1
Offer_Operation_RESERVE Offer_Operation_Type = 2
Offer_Operation_UNRESERVE Offer_Operation_Type = 3
Offer_Operation_CREATE Offer_Operation_Type = 4
Offer_Operation_DESTROY Offer_Operation_Type = 5
)
var Offer_Operation_Type_name = map[int32]string{
1: "LAUNCH",
2: "RESERVE",
3: "UNRESERVE",
4: "CREATE",
5: "DESTROY",
}
var Offer_Operation_Type_value = map[string]int32{
"LAUNCH": 1,
"RESERVE": 2,
"UNRESERVE": 3,
"CREATE": 4,
"DESTROY": 5,
}
func (x Offer_Operation_Type) Enum() *Offer_Operation_Type {
p := new(Offer_Operation_Type)
*p = x
return p
}
func (x Offer_Operation_Type) String() string {
return proto.EnumName(Offer_Operation_Type_name, int32(x))
}
func (x *Offer_Operation_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Offer_Operation_Type_value, data, "Offer_Operation_Type")
if err != nil {
return err
}
*x = Offer_Operation_Type(value)
return nil
}
// Describes the source of the task status update.
type TaskStatus_Source int32
const (
TaskStatus_SOURCE_MASTER TaskStatus_Source = 0
TaskStatus_SOURCE_SLAVE TaskStatus_Source = 1
TaskStatus_SOURCE_EXECUTOR TaskStatus_Source = 2
)
var TaskStatus_Source_name = map[int32]string{
0: "SOURCE_MASTER",
1: "SOURCE_SLAVE",
2: "SOURCE_EXECUTOR",
}
var TaskStatus_Source_value = map[string]int32{
"SOURCE_MASTER": 0,
"SOURCE_SLAVE": 1,
"SOURCE_EXECUTOR": 2,
}
func (x TaskStatus_Source) Enum() *TaskStatus_Source {
p := new(TaskStatus_Source)
*p = x
return p
}
func (x TaskStatus_Source) String() string {
return proto.EnumName(TaskStatus_Source_name, int32(x))
}
func (x *TaskStatus_Source) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TaskStatus_Source_value, data, "TaskStatus_Source")
if err != nil {
return err
}
*x = TaskStatus_Source(value)
return nil
}
// Detailed reason for the task status update.
//
// TODO(bmahler): Differentiate between slave removal reasons
// (e.g. unhealthy vs. unregistered for maintenance).
type TaskStatus_Reason int32
const (
TaskStatus_REASON_COMMAND_EXECUTOR_FAILED TaskStatus_Reason = 0
TaskStatus_REASON_EXECUTOR_PREEMPTED TaskStatus_Reason = 17
TaskStatus_REASON_EXECUTOR_TERMINATED TaskStatus_Reason = 1
TaskStatus_REASON_EXECUTOR_UNREGISTERED TaskStatus_Reason = 2
TaskStatus_REASON_FRAMEWORK_REMOVED TaskStatus_Reason = 3
TaskStatus_REASON_GC_ERROR TaskStatus_Reason = 4
TaskStatus_REASON_INVALID_FRAMEWORKID TaskStatus_Reason = 5
TaskStatus_REASON_INVALID_OFFERS TaskStatus_Reason = 6
TaskStatus_REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7
TaskStatus_REASON_MEMORY_LIMIT TaskStatus_Reason = 8
TaskStatus_REASON_RECONCILIATION TaskStatus_Reason = 9
TaskStatus_REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18
TaskStatus_REASON_SLAVE_DISCONNECTED TaskStatus_Reason = 10
TaskStatus_REASON_SLAVE_REMOVED TaskStatus_Reason = 11
TaskStatus_REASON_SLAVE_RESTARTED TaskStatus_Reason = 12
TaskStatus_REASON_SLAVE_UNKNOWN TaskStatus_Reason = 13
TaskStatus_REASON_TASK_INVALID TaskStatus_Reason = 14
TaskStatus_REASON_TASK_UNAUTHORIZED TaskStatus_Reason = 15
TaskStatus_REASON_TASK_UNKNOWN TaskStatus_Reason = 16
)
var TaskStatus_Reason_name = map[int32]string{
0: "REASON_COMMAND_EXECUTOR_FAILED",
17: "REASON_EXECUTOR_PREEMPTED",
1: "REASON_EXECUTOR_TERMINATED",
2: "REASON_EXECUTOR_UNREGISTERED",
3: "REASON_FRAMEWORK_REMOVED",
4: "REASON_GC_ERROR",
5: "REASON_INVALID_FRAMEWORKID",
6: "REASON_INVALID_OFFERS",
7: "REASON_MASTER_DISCONNECTED",
8: "REASON_MEMORY_LIMIT",
9: "REASON_RECONCILIATION",
18: "REASON_RESOURCES_UNKNOWN",
10: "REASON_SLAVE_DISCONNECTED",
11: "REASON_SLAVE_REMOVED",
12: "REASON_SLAVE_RESTARTED",
13: "REASON_SLAVE_UNKNOWN",
14: "REASON_TASK_INVALID",
15: "REASON_TASK_UNAUTHORIZED",
16: "REASON_TASK_UNKNOWN",
}
var TaskStatus_Reason_value = map[string]int32{
"REASON_COMMAND_EXECUTOR_FAILED": 0,
"REASON_EXECUTOR_PREEMPTED": 17,
"REASON_EXECUTOR_TERMINATED": 1,
"REASON_EXECUTOR_UNREGISTERED": 2,
"REASON_FRAMEWORK_REMOVED": 3,
"REASON_GC_ERROR": 4,
"REASON_INVALID_FRAMEWORKID": 5,
"REASON_INVALID_OFFERS": 6,
"REASON_MASTER_DISCONNECTED": 7,
"REASON_MEMORY_LIMIT": 8,
"REASON_RECONCILIATION": 9,
"REASON_RESOURCES_UNKNOWN": 18,
"REASON_SLAVE_DISCONNECTED": 10,
"REASON_SLAVE_REMOVED": 11,
"REASON_SLAVE_RESTARTED": 12,
"REASON_SLAVE_UNKNOWN": 13,
"REASON_TASK_INVALID": 14,
"REASON_TASK_UNAUTHORIZED": 15,
"REASON_TASK_UNKNOWN": 16,
}
func (x TaskStatus_Reason) Enum() *TaskStatus_Reason {
p := new(TaskStatus_Reason)
*p = x
return p
}
func (x TaskStatus_Reason) String() string {
return proto.EnumName(TaskStatus_Reason_name, int32(x))
}
func (x *TaskStatus_Reason) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TaskStatus_Reason_value, data, "TaskStatus_Reason")
if err != nil {
return err
}
*x = TaskStatus_Reason(value)
return nil
}
type ACL_Entity_Type int32
const (
ACL_Entity_SOME ACL_Entity_Type = 0
ACL_Entity_ANY ACL_Entity_Type = 1
ACL_Entity_NONE ACL_Entity_Type = 2
)
var ACL_Entity_Type_name = map[int32]string{
0: "SOME",
1: "ANY",
2: "NONE",
}
var ACL_Entity_Type_value = map[string]int32{
"SOME": 0,
"ANY": 1,
"NONE": 2,
}
func (x ACL_Entity_Type) Enum() *ACL_Entity_Type {
p := new(ACL_Entity_Type)
*p = x
return p
}
func (x ACL_Entity_Type) String() string {
return proto.EnumName(ACL_Entity_Type_name, int32(x))
}
func (x *ACL_Entity_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ACL_Entity_Type_value, data, "ACL_Entity_Type")
if err != nil {
return err
}
*x = ACL_Entity_Type(value)
return nil
}
type Volume_Mode int32
const (
Volume_RW Volume_Mode = 1
Volume_RO Volume_Mode = 2
)
var Volume_Mode_name = map[int32]string{
1: "RW",
2: "RO",
}
var Volume_Mode_value = map[string]int32{
"RW": 1,
"RO": 2,
}
func (x Volume_Mode) Enum() *Volume_Mode {
p := new(Volume_Mode)
*p = x
return p
}
func (x Volume_Mode) String() string {
return proto.EnumName(Volume_Mode_name, int32(x))
}
func (x *Volume_Mode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Volume_Mode_value, data, "Volume_Mode")
if err != nil {
return err
}
*x = Volume_Mode(value)
return nil
}
// All container implementation types.
type ContainerInfo_Type int32
const (
ContainerInfo_DOCKER ContainerInfo_Type = 1
ContainerInfo_MESOS ContainerInfo_Type = 2
)
var ContainerInfo_Type_name = map[int32]string{
1: "DOCKER",
2: "MESOS",
}
var ContainerInfo_Type_value = map[string]int32{
"DOCKER": 1,
"MESOS": 2,
}
func (x ContainerInfo_Type) Enum() *ContainerInfo_Type {
p := new(ContainerInfo_Type)
*p = x
return p
}
func (x ContainerInfo_Type) String() string {
return proto.EnumName(ContainerInfo_Type_name, int32(x))
}
func (x *ContainerInfo_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ContainerInfo_Type_value, data, "ContainerInfo_Type")
if err != nil {
return err
}
*x = ContainerInfo_Type(value)
return nil
}
// Network options.
type ContainerInfo_DockerInfo_Network int32
const (
ContainerInfo_DockerInfo_HOST ContainerInfo_DockerInfo_Network = 1
ContainerInfo_DockerInfo_BRIDGE ContainerInfo_DockerInfo_Network = 2
ContainerInfo_DockerInfo_NONE ContainerInfo_DockerInfo_Network = 3
)
var ContainerInfo_DockerInfo_Network_name = map[int32]string{
1: "HOST",
2: "BRIDGE",
3: "NONE",
}
var ContainerInfo_DockerInfo_Network_value = map[string]int32{
"HOST": 1,
"BRIDGE": 2,
"NONE": 3,
}
func (x ContainerInfo_DockerInfo_Network) Enum() *ContainerInfo_DockerInfo_Network {
p := new(ContainerInfo_DockerInfo_Network)
*p = x
return p
}
func (x ContainerInfo_DockerInfo_Network) String() string {
return proto.EnumName(ContainerInfo_DockerInfo_Network_name, int32(x))
}
func (x *ContainerInfo_DockerInfo_Network) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ContainerInfo_DockerInfo_Network_value, data, "ContainerInfo_DockerInfo_Network")
if err != nil {
return err
}
*x = ContainerInfo_DockerInfo_Network(value)
return nil
}
type DiscoveryInfo_Visibility int32
const (
DiscoveryInfo_FRAMEWORK DiscoveryInfo_Visibility = 0
DiscoveryInfo_CLUSTER DiscoveryInfo_Visibility = 1
DiscoveryInfo_EXTERNAL DiscoveryInfo_Visibility = 2
)
var DiscoveryInfo_Visibility_name = map[int32]string{
0: "FRAMEWORK",
1: "CLUSTER",
2: "EXTERNAL",
}
var DiscoveryInfo_Visibility_value = map[string]int32{
"FRAMEWORK": 0,
"CLUSTER": 1,
"EXTERNAL": 2,
}
func (x DiscoveryInfo_Visibility) Enum() *DiscoveryInfo_Visibility {
p := new(DiscoveryInfo_Visibility)
*p = x
return p
}
func (x DiscoveryInfo_Visibility) String() string {
return proto.EnumName(DiscoveryInfo_Visibility_name, int32(x))
}
func (x *DiscoveryInfo_Visibility) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(DiscoveryInfo_Visibility_value, data, "DiscoveryInfo_Visibility")
if err != nil {
return err
}
*x = DiscoveryInfo_Visibility(value)
return nil
}
// *
// A unique ID assigned to a framework. A framework can reuse this ID
// in order to do failover (see MesosSchedulerDriver).
type FrameworkID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *FrameworkID) Reset() { *m = FrameworkID{} }
func (m *FrameworkID) String() string { return proto.CompactTextString(m) }
func (*FrameworkID) ProtoMessage() {}
func (m *FrameworkID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// A unique ID assigned to an offer.
type OfferID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *OfferID) Reset() { *m = OfferID{} }
func (m *OfferID) String() string { return proto.CompactTextString(m) }
func (*OfferID) ProtoMessage() {}
func (m *OfferID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// A unique ID assigned to a slave. Currently, a slave gets a new ID
// whenever it (re)registers with Mesos. Framework writers shouldn't
// assume any binding between a slave ID and and a hostname.
type SlaveID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SlaveID) Reset() { *m = SlaveID{} }
func (m *SlaveID) String() string { return proto.CompactTextString(m) }
func (*SlaveID) ProtoMessage() {}
func (m *SlaveID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// A framework generated ID to distinguish a task. The ID must remain
// unique while the task is active. However, a framework can reuse an
// ID _only_ if a previous task with the same ID has reached a
// terminal state (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.).
type TaskID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *TaskID) Reset() { *m = TaskID{} }
func (m *TaskID) String() string { return proto.CompactTextString(m) }
func (*TaskID) ProtoMessage() {}
func (m *TaskID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// A framework generated ID to distinguish an executor. Only one
// executor with the same ID can be active on the same slave at a
// time.
type ExecutorID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ExecutorID) Reset() { *m = ExecutorID{} }
func (m *ExecutorID) String() string { return proto.CompactTextString(m) }
func (*ExecutorID) ProtoMessage() {}
func (m *ExecutorID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// A slave generated ID to distinguish a container. The ID must be unique
// between any active or completed containers on the slave. In particular,
// containers for different runs of the same (framework, executor) pair must be
// unique.
type ContainerID struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ContainerID) Reset() { *m = ContainerID{} }
func (m *ContainerID) String() string { return proto.CompactTextString(m) }
func (*ContainerID) ProtoMessage() {}
func (m *ContainerID) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
// *
// Describes a framework.
type FrameworkInfo struct {
// Used to determine the Unix user that an executor or task should
// be launched as. If the user field is set to an empty string Mesos
// will automagically set it to the current user.
User *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"`
// Name of the framework that shows up in the Mesos Web UI.
Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
// Note that 'id' is only available after a framework has
// registered, however, it is included here in order to facilitate
// scheduler failover (i.e., if it is set then the
// MesosSchedulerDriver expects the scheduler is performing
// failover).
Id *FrameworkID `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
// The amount of time that the master will wait for the scheduler to
// failover before it tears down the framework by killing all its
// tasks/executors. This should be non-zero if a framework expects
// to reconnect after a failover and not lose its tasks/executors.
FailoverTimeout *float64 `protobuf:"fixed64,4,opt,name=failover_timeout,def=0" json:"failover_timeout,omitempty"`
// If set, framework pid, executor pids and status updates are
// checkpointed to disk by the slaves. Checkpointing allows a
// restarted slave to reconnect with old executors and recover
// status updates, at the cost of disk I/O.
Checkpoint *bool `protobuf:"varint,5,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"`
// Used to group frameworks for allocation decisions, depending on
// the allocation policy being used.
Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"`
// Used to indicate the current host from which the scheduler is
// registered in the Mesos Web UI. If set to an empty string Mesos
// will automagically set it to the current hostname.
Hostname *string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"`
// This field should match the credential's principal the framework
// uses for authentication. This field is used for framework API
// rate limiting and dynamic reservations. It should be set even
// if authentication is not enabled if these features are desired.
Principal *string `protobuf:"bytes,8,opt,name=principal" json:"principal,omitempty"`
// This field allows a framework to advertise its web UI, so that
// the Mesos web UI can link to it. It is expected to be a full URL,
// for example http://my-scheduler.example.com:8080/.
WebuiUrl *string `protobuf:"bytes,9,opt,name=webui_url" json:"webui_url,omitempty"`
// This field allows a framework to advertise its set of
// capabilities (e.g., ability to receive offers for revocable
// resources).
Capabilities []*FrameworkInfo_Capability `protobuf:"bytes,10,rep,name=capabilities" json:"capabilities,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *FrameworkInfo) Reset() { *m = FrameworkInfo{} }
func (m *FrameworkInfo) String() string { return proto.CompactTextString(m) }
func (*FrameworkInfo) ProtoMessage() {}
const Default_FrameworkInfo_FailoverTimeout float64 = 0
const Default_FrameworkInfo_Checkpoint bool = false
const Default_FrameworkInfo_Role string = "*"
func (m *FrameworkInfo) GetUser() string {
if m != nil && m.User != nil {
return *m.User
}
return ""
}
func (m *FrameworkInfo) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *FrameworkInfo) GetId() *FrameworkID {
if m != nil {
return m.Id
}
return nil
}
func (m *FrameworkInfo) GetFailoverTimeout() float64 {
if m != nil && m.FailoverTimeout != nil {
return *m.FailoverTimeout
}
return Default_FrameworkInfo_FailoverTimeout
}
func (m *FrameworkInfo) GetCheckpoint() bool {
if m != nil && m.Checkpoint != nil {
return *m.Checkpoint
}
return Default_FrameworkInfo_Checkpoint
}
func (m *FrameworkInfo) GetRole() string {
if m != nil && m.Role != nil {
return *m.Role
}
return Default_FrameworkInfo_Role
}
func (m *FrameworkInfo) GetHostname() string {
if m != nil && m.Hostname != nil {
return *m.Hostname
}
return ""
}
func (m *FrameworkInfo) GetPrincipal() string {
if m != nil && m.Principal != nil {
return *m.Principal
}
return ""
}
func (m *FrameworkInfo) GetWebuiUrl() string {
if m != nil && m.WebuiUrl != nil {
return *m.WebuiUrl
}
return ""
}
func (m *FrameworkInfo) GetCapabilities() []*FrameworkInfo_Capability {
if m != nil {
return m.Capabilities
}
return nil
}
type FrameworkInfo_Capability struct {
Type *FrameworkInfo_Capability_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.FrameworkInfo_Capability_Type" json:"type,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *FrameworkInfo_Capability) Reset() { *m = FrameworkInfo_Capability{} }
func (m *FrameworkInfo_Capability) String() string { return proto.CompactTextString(m) }
func (*FrameworkInfo_Capability) ProtoMessage() {}
func (m *FrameworkInfo_Capability) GetType() FrameworkInfo_Capability_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return FrameworkInfo_Capability_REVOCABLE_RESOURCES
}
// *
// Describes a health check for a task or executor (or any arbitrary
// process/command). A "strategy" is picked by specifying one of the
// optional fields; currently only 'command' is supported.
// Specifying more than one strategy is an error.
type HealthCheck struct {
// HTTP health check - not yet recommended for use, see MESOS-2533.
Http *HealthCheck_HTTP `protobuf:"bytes,1,opt,name=http" json:"http,omitempty"`
// Amount of time to wait until starting the health checks.
DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds,def=15" json:"delay_seconds,omitempty"`
// Interval between health checks.
IntervalSeconds *float64 `protobuf:"fixed64,3,opt,name=interval_seconds,def=10" json:"interval_seconds,omitempty"`
// Amount of time to wait for the health check to complete.
TimeoutSeconds *float64 `protobuf:"fixed64,4,opt,name=timeout_seconds,def=20" json:"timeout_seconds,omitempty"`
// Number of consecutive failures until considered unhealthy.
ConsecutiveFailures *uint32 `protobuf:"varint,5,opt,name=consecutive_failures,def=3" json:"consecutive_failures,omitempty"`
// Amount of time to allow failed health checks since launch.
GracePeriodSeconds *float64 `protobuf:"fixed64,6,opt,name=grace_period_seconds,def=10" json:"grace_period_seconds,omitempty"`
// Command health check.
Command *CommandInfo `protobuf:"bytes,7,opt,name=command" json:"command,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *HealthCheck) Reset() { *m = HealthCheck{} }
func (m *HealthCheck) String() string { return proto.CompactTextString(m) }
func (*HealthCheck) ProtoMessage() {}
const Default_HealthCheck_DelaySeconds float64 = 15
const Default_HealthCheck_IntervalSeconds float64 = 10
const Default_HealthCheck_TimeoutSeconds float64 = 20
const Default_HealthCheck_ConsecutiveFailures uint32 = 3
const Default_HealthCheck_GracePeriodSeconds float64 = 10
func (m *HealthCheck) GetHttp() *HealthCheck_HTTP {
if m != nil {
return m.Http
}
return nil
}
func (m *HealthCheck) GetDelaySeconds() float64 {
if m != nil && m.DelaySeconds != nil {
return *m.DelaySeconds
}
return Default_HealthCheck_DelaySeconds
}
func (m *HealthCheck) GetIntervalSeconds() float64 {
if m != nil && m.IntervalSeconds != nil {
return *m.IntervalSeconds
}
return Default_HealthCheck_IntervalSeconds
}
func (m *HealthCheck) GetTimeoutSeconds() float64 {
if m != nil && m.TimeoutSeconds != nil {
return *m.TimeoutSeconds
}
return Default_HealthCheck_TimeoutSeconds
}
func (m *HealthCheck) GetConsecutiveFailures() uint32 {
if m != nil && m.ConsecutiveFailures != nil {
return *m.ConsecutiveFailures
}
return Default_HealthCheck_ConsecutiveFailures
}
func (m *HealthCheck) GetGracePeriodSeconds() float64 {
if m != nil && m.GracePeriodSeconds != nil {
return *m.GracePeriodSeconds
}
return Default_HealthCheck_GracePeriodSeconds
}
func (m *HealthCheck) GetCommand() *CommandInfo {
if m != nil {
return m.Command
}
return nil
}
// Describes an HTTP health check. This is not fully implemented and not
// recommended for use - see MESOS-2533.
type HealthCheck_HTTP struct {
// Port to send the HTTP request.
Port *uint32 `protobuf:"varint,1,req,name=port" json:"port,omitempty"`
// HTTP request path.
Path *string `protobuf:"bytes,2,opt,name=path,def=/" json:"path,omitempty"`
// Expected response statuses. Not specifying any statuses implies
// that any returned status is acceptable.
Statuses []uint32 `protobuf:"varint,4,rep,name=statuses" json:"statuses,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *HealthCheck_HTTP) Reset() { *m = HealthCheck_HTTP{} }
func (m *HealthCheck_HTTP) String() string { return proto.CompactTextString(m) }
func (*HealthCheck_HTTP) ProtoMessage() {}
const Default_HealthCheck_HTTP_Path string = "/"
func (m *HealthCheck_HTTP) GetPort() uint32 {
if m != nil && m.Port != nil {
return *m.Port
}
return 0
}
func (m *HealthCheck_HTTP) GetPath() string {
if m != nil && m.Path != nil {
return *m.Path
}
return Default_HealthCheck_HTTP_Path
}
func (m *HealthCheck_HTTP) GetStatuses() []uint32 {
if m != nil {
return m.Statuses
}
return nil
}
// *
// Describes a command, executed via: '/bin/sh -c value'. Any URIs specified
// are fetched before executing the command. If the executable field for an
// uri is set, executable file permission is set on the downloaded file.
// Otherwise, if the downloaded file has a recognized archive extension
// (currently [compressed] tar and zip) it is extracted into the executor's
// working directory. This extraction can be disabled by setting `extract` to
// false. In addition, any environment variables are set before executing
// the command (so they can be used to "parameterize" your command).
type CommandInfo struct {
// NOTE: MesosContainerizer does currently not support this
// attribute and tasks supplying a 'container' will fail.
Container *CommandInfo_ContainerInfo `protobuf:"bytes,4,opt,name=container" json:"container,omitempty"`
Uris []*CommandInfo_URI `protobuf:"bytes,1,rep,name=uris" json:"uris,omitempty"`
Environment *Environment `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty"`
// There are two ways to specify the command:
// 1) If 'shell == true', the command will be launched via shell
// (i.e., /bin/sh -c 'value'). The 'value' specified will be
// treated as the shell command. The 'arguments' will be ignored.
// 2) If 'shell == false', the command will be launched by passing
// arguments to an executable. The 'value' specified will be
// treated as the filename of the executable. The 'arguments'
// will be treated as the arguments to the executable. This is
// similar to how POSIX exec families launch processes (i.e.,
// execlp(value, arguments(0), arguments(1), ...)).
// NOTE: The field 'value' is changed from 'required' to 'optional'
// in 0.20.0. It will only cause issues if a new framework is
// connecting to an old master.
Shell *bool `protobuf:"varint,6,opt,name=shell,def=1" json:"shell,omitempty"`
Value *string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
Arguments []string `protobuf:"bytes,7,rep,name=arguments" json:"arguments,omitempty"`
// Enables executor and tasks to run as a specific user. If the user
// field is present both in FrameworkInfo and here, the CommandInfo
// user value takes precedence.
User *string `protobuf:"bytes,5,opt,name=user" json:"user,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandInfo) Reset() { *m = CommandInfo{} }
func (m *CommandInfo) String() string { return proto.CompactTextString(m) }
func (*CommandInfo) ProtoMessage() {}
const Default_CommandInfo_Shell bool = true
func (m *CommandInfo) GetContainer() *CommandInfo_ContainerInfo {
if m != nil {
return m.Container
}
return nil
}
func (m *CommandInfo) GetUris() []*CommandInfo_URI {
if m != nil {
return m.Uris
}
return nil
}
func (m *CommandInfo) GetEnvironment() *Environment {
if m != nil {
return m.Environment
}
return nil
}
func (m *CommandInfo) GetShell() bool {
if m != nil && m.Shell != nil {
return *m.Shell
}
return Default_CommandInfo_Shell
}
func (m *CommandInfo) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func (m *CommandInfo) GetArguments() []string {
if m != nil {
return m.Arguments
}
return nil
}
func (m *CommandInfo) GetUser() string {
if m != nil && m.User != nil {