forked from moby/swarmkit
/
types.pb.go
9760 lines (9351 loc) · 240 KB
/
types.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-gogo.
// source: types.proto
// DO NOT EDIT!
/*
Package api is a generated protocol buffer package.
It is generated from these files:
types.proto
specs.proto
objects.proto
control.proto
dispatcher.proto
ca.proto
snapshot.proto
raft.proto
It has these top-level messages:
Version
Annotations
Resources
ResourceRequirements
Platform
PluginDescription
EngineDescription
NodeDescription
RaftMemberStatus
NodeStatus
Image
VolumeTemplate
Mount
RestartPolicy
UpdateConfig
ContainerStatus
TaskStatus
IPAMConfig
PortConfig
Driver
IPAMOptions
Peer
WeightedPeer
IssuanceStatus
AcceptancePolicy
CAConfig
OrchestrationConfig
DispatcherConfig
RaftConfig
RaftMember
Placement
RootCA
Certificate
EncryptionKey
Manager
NodeSpec
ServiceSpec
ReplicatedService
GlobalService
TaskSpec
ContainerSpec
EndpointSpec
NetworkSpec
ClusterSpec
Meta
Node
Service
Endpoint
Task
NetworkAttachment
Network
Cluster
GetNodeRequest
GetNodeResponse
ListNodesRequest
ListNodesResponse
UpdateNodeRequest
UpdateNodeResponse
RemoveNodeRequest
RemoveNodeResponse
GetTaskRequest
GetTaskResponse
RemoveTaskRequest
RemoveTaskResponse
ListTasksRequest
ListTasksResponse
CreateServiceRequest
CreateServiceResponse
GetServiceRequest
GetServiceResponse
UpdateServiceRequest
UpdateServiceResponse
RemoveServiceRequest
RemoveServiceResponse
ListServicesRequest
ListServicesResponse
CreateNetworkRequest
CreateNetworkResponse
GetNetworkRequest
GetNetworkResponse
RemoveNetworkRequest
RemoveNetworkResponse
ListNetworksRequest
ListNetworksResponse
ListManagersRequest
ListManagersResponse
RemoveManagerRequest
RemoveManagerResponse
GetClusterRequest
GetClusterResponse
ListClustersRequest
ListClustersResponse
UpdateClusterRequest
UpdateClusterResponse
SessionRequest
SessionMessage
HeartbeatRequest
HeartbeatResponse
UpdateTaskStatusRequest
UpdateTaskStatusResponse
TasksRequest
TasksMessage
NodeCertificateStatusRequest
NodeCertificateStatusResponse
IssueNodeCertificateRequest
IssueNodeCertificateResponse
GetRootCACertificateRequest
GetRootCACertificateResponse
StoreSnapshot
ClusterSnapshot
Snapshot
JoinRequest
JoinResponse
LeaveRequest
LeaveResponse
ProcessRaftMessageRequest
ProcessRaftMessageResponse
ResolveAddressRequest
ResolveAddressResponse
InternalRaftRequest
StoreAction
*/
package api
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import docker_cluster_api "github.com/docker/swarmkit/api/timestamp"
import docker_cluster_api1 "github.com/docker/swarmkit/api/duration"
import _ "github.com/gogo/protobuf/gogoproto"
import strings "strings"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import sort "sort"
import strconv "strconv"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
// TaskState enumerates the states that a task progresses through within an
// agent. States are designed to be monotonically increasing, such that if two
// states are seen by a task, the greater of the new represents the true state.
type TaskState int32
const (
TaskStateNew TaskState = 0
TaskStateAllocated TaskState = 64
TaskStatePending TaskState = 128
TaskStateAssigned TaskState = 192
TaskStateAccepted TaskState = 256
TaskStatePreparing TaskState = 320
TaskStateReady TaskState = 384
TaskStateStarting TaskState = 448
TaskStateRunning TaskState = 512
TaskStateCompleted TaskState = 576
TaskStateShutdown TaskState = 640
TaskStateFailed TaskState = 704
TaskStateRejected TaskState = 768
)
var TaskState_name = map[int32]string{
0: "NEW",
64: "ALLOCATED",
128: "PENDING",
192: "ASSIGNED",
256: "ACCEPTED",
320: "PREPARING",
384: "READY",
448: "STARTING",
512: "RUNNING",
576: "COMPLETE",
640: "SHUTDOWN",
704: "FAILED",
768: "REJECTED",
}
var TaskState_value = map[string]int32{
"NEW": 0,
"ALLOCATED": 64,
"PENDING": 128,
"ASSIGNED": 192,
"ACCEPTED": 256,
"PREPARING": 320,
"READY": 384,
"STARTING": 448,
"RUNNING": 512,
"COMPLETE": 576,
"SHUTDOWN": 640,
"FAILED": 704,
"REJECTED": 768,
}
func (x TaskState) String() string {
return proto.EnumName(TaskState_name, int32(x))
}
func (TaskState) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
type NodeRole int32
const (
NodeRoleWorker NodeRole = 0
NodeRoleManager NodeRole = 1
)
var NodeRole_name = map[int32]string{
0: "WORKER",
1: "MANAGER",
}
var NodeRole_value = map[string]int32{
"WORKER": 0,
"MANAGER": 1,
}
func (x NodeRole) String() string {
return proto.EnumName(NodeRole_name, int32(x))
}
func (NodeRole) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
type RaftMemberStatus_Reachability int32
const (
// Unknown indicates that the manager state cannot be resolved
RaftMemberStatus_UNKNOWN RaftMemberStatus_Reachability = 0
// Unreachable indicates that the node cannot be contacted by other
// raft cluster members.
RaftMemberStatus_UNREACHABLE RaftMemberStatus_Reachability = 1
// Reachable indicates that the node is healthy and reachable
// by other members.
RaftMemberStatus_REACHABLE RaftMemberStatus_Reachability = 2
)
var RaftMemberStatus_Reachability_name = map[int32]string{
0: "UNKNOWN",
1: "UNREACHABLE",
2: "REACHABLE",
}
var RaftMemberStatus_Reachability_value = map[string]int32{
"UNKNOWN": 0,
"UNREACHABLE": 1,
"REACHABLE": 2,
}
func (x RaftMemberStatus_Reachability) String() string {
return proto.EnumName(RaftMemberStatus_Reachability_name, int32(x))
}
func (RaftMemberStatus_Reachability) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{8, 0}
}
// TODO(aluzzardi) These should be using `gogoproto.enumvalue_customname`.
type NodeStatus_State int32
const (
// Unknown indicates the node state cannot be resolved.
NodeStatus_UNKNOWN NodeStatus_State = 0
// Down indicates the node is down.
NodeStatus_DOWN NodeStatus_State = 1
// Ready indicates the node is ready to accept tasks.
NodeStatus_READY NodeStatus_State = 2
// Disconnected indicates the node is currently trying to find new manager.
NodeStatus_DISCONNECTED NodeStatus_State = 3
)
var NodeStatus_State_name = map[int32]string{
0: "UNKNOWN",
1: "DOWN",
2: "READY",
3: "DISCONNECTED",
}
var NodeStatus_State_value = map[string]int32{
"UNKNOWN": 0,
"DOWN": 1,
"READY": 2,
"DISCONNECTED": 3,
}
func (x NodeStatus_State) String() string {
return proto.EnumName(NodeStatus_State_name, int32(x))
}
func (NodeStatus_State) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{9, 0} }
type Mount_MountType int32
const (
MountTypeBind Mount_MountType = 0
MountTypeVolume Mount_MountType = 2
)
var Mount_MountType_name = map[int32]string{
0: "BIND",
2: "VOLUME",
}
var Mount_MountType_value = map[string]int32{
"BIND": 0,
"VOLUME": 2,
}
func (x Mount_MountType) String() string {
return proto.EnumName(Mount_MountType_name, int32(x))
}
func (Mount_MountType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{12, 0} }
type Mount_MountPropagation int32
const (
MountPropagationRPrivate Mount_MountPropagation = 0
MountPropagationPrivate Mount_MountPropagation = 1
MountPropagationRShared Mount_MountPropagation = 2
MountPropagationShared Mount_MountPropagation = 3
MountPropagationRSlave Mount_MountPropagation = 4
MountPropagationSlave Mount_MountPropagation = 5
)
var Mount_MountPropagation_name = map[int32]string{
0: "RPRIVATE",
1: "PRIVATE",
2: "RSHARED",
3: "SHARED",
4: "RSLAVE",
5: "SLAVE",
}
var Mount_MountPropagation_value = map[string]int32{
"RPRIVATE": 0,
"PRIVATE": 1,
"RSHARED": 2,
"SHARED": 3,
"RSLAVE": 4,
"SLAVE": 5,
}
func (x Mount_MountPropagation) String() string {
return proto.EnumName(Mount_MountPropagation_name, int32(x))
}
func (Mount_MountPropagation) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{12, 1}
}
type RestartPolicy_RestartCondition int32
const (
RestartOnNone RestartPolicy_RestartCondition = 0
RestartOnFailure RestartPolicy_RestartCondition = 1
RestartOnAny RestartPolicy_RestartCondition = 2
)
var RestartPolicy_RestartCondition_name = map[int32]string{
0: "NONE",
1: "ON_FAILURE",
2: "ANY",
}
var RestartPolicy_RestartCondition_value = map[string]int32{
"NONE": 0,
"ON_FAILURE": 1,
"ANY": 2,
}
func (x RestartPolicy_RestartCondition) String() string {
return proto.EnumName(RestartPolicy_RestartCondition_name, int32(x))
}
func (RestartPolicy_RestartCondition) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{13, 0}
}
// AddressFamily specifies the network address family that
// this IPAMConfig belongs to.
type IPAMConfig_AddressFamily int32
const (
IPAMConfig_UNKNOWN IPAMConfig_AddressFamily = 0
IPAMConfig_IPV4 IPAMConfig_AddressFamily = 4
IPAMConfig_IPV6 IPAMConfig_AddressFamily = 6
)
var IPAMConfig_AddressFamily_name = map[int32]string{
0: "UNKNOWN",
4: "IPV4",
6: "IPV6",
}
var IPAMConfig_AddressFamily_value = map[string]int32{
"UNKNOWN": 0,
"IPV4": 4,
"IPV6": 6,
}
func (x IPAMConfig_AddressFamily) String() string {
return proto.EnumName(IPAMConfig_AddressFamily_name, int32(x))
}
func (IPAMConfig_AddressFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{17, 0}
}
type PortConfig_Protocol int32
const (
ProtocolTCP PortConfig_Protocol = 0
ProtocolUDP PortConfig_Protocol = 1
)
var PortConfig_Protocol_name = map[int32]string{
0: "TCP",
1: "UDP",
}
var PortConfig_Protocol_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
func (x PortConfig_Protocol) String() string {
return proto.EnumName(PortConfig_Protocol_name, int32(x))
}
func (PortConfig_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{18, 0} }
type IssuanceStatus_State int32
const (
IssuanceStateUnknown IssuanceStatus_State = 0
IssuanceStateRenew IssuanceStatus_State = 1
IssuanceStatePending IssuanceStatus_State = 2
IssuanceStateIssued IssuanceStatus_State = 3
IssuanceStateFailed IssuanceStatus_State = 4
IssuanceStateRejected IssuanceStatus_State = 5
)
var IssuanceStatus_State_name = map[int32]string{
0: "UNKNOWN",
1: "RENEW",
2: "PENDING",
3: "ISSUED",
4: "FAILED",
5: "REJECTED",
}
var IssuanceStatus_State_value = map[string]int32{
"UNKNOWN": 0,
"RENEW": 1,
"PENDING": 2,
"ISSUED": 3,
"FAILED": 4,
"REJECTED": 5,
}
func (x IssuanceStatus_State) String() string {
return proto.EnumName(IssuanceStatus_State_name, int32(x))
}
func (IssuanceStatus_State) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23, 0} }
// Encryption algorithm that can implemented using this key
type EncryptionKey_Algorithm int32
const (
AES_128_GCM EncryptionKey_Algorithm = 0
)
var EncryptionKey_Algorithm_name = map[int32]string{
0: "AES_128_GCM",
}
var EncryptionKey_Algorithm_value = map[string]int32{
"AES_128_GCM": 0,
}
func (x EncryptionKey_Algorithm) String() string {
return proto.EnumName(EncryptionKey_Algorithm_name, int32(x))
}
func (EncryptionKey_Algorithm) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{33, 0}
}
// Version tracks the last time an object in the store was updated.
type Version struct {
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
}
func (m *Version) Reset() { *m = Version{} }
func (*Version) ProtoMessage() {}
func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
// Annotations provide useful information to identify API objects. They are
// common to all API specs.
type Annotations struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *Annotations) Reset() { *m = Annotations{} }
func (*Annotations) ProtoMessage() {}
func (*Annotations) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
type Resources struct {
// Amount of CPUs (e.g. 2000000000 = 2 CPU cores)
NanoCPUs int64 `protobuf:"varint,1,opt,name=nano_cpus,json=nanoCpus,proto3" json:"nano_cpus,omitempty"`
// Amount of memory in bytes.
MemoryBytes int64 `protobuf:"varint,2,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"`
}
func (m *Resources) Reset() { *m = Resources{} }
func (*Resources) ProtoMessage() {}
func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} }
type ResourceRequirements struct {
Limits *Resources `protobuf:"bytes,1,opt,name=limits" json:"limits,omitempty"`
Reservations *Resources `protobuf:"bytes,2,opt,name=reservations" json:"reservations,omitempty"`
}
func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
func (*ResourceRequirements) ProtoMessage() {}
func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} }
type Platform struct {
// Architecture (e.g. x86_64)
Architecture string `protobuf:"bytes,1,opt,name=architecture,proto3" json:"architecture,omitempty"`
// Operating System (e.g. linux)
OS string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
}
func (m *Platform) Reset() { *m = Platform{} }
func (*Platform) ProtoMessage() {}
func (*Platform) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} }
// PluginDescription describes an engine plugin.
type PluginDescription struct {
// Type of plugin. Canonical values for existing types are
// Volume, Network, and Authorization. More types could be
// supported in the future.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Name of the plugin
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *PluginDescription) Reset() { *m = PluginDescription{} }
func (*PluginDescription) ProtoMessage() {}
func (*PluginDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} }
type EngineDescription struct {
// Docker daemon version running on the node.
EngineVersion string `protobuf:"bytes,1,opt,name=engine_version,json=engineVersion,proto3" json:"engine_version,omitempty"`
// Labels attached to the engine.
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Volume, Network, and Auth plugins
Plugins []PluginDescription `protobuf:"bytes,3,rep,name=plugins" json:"plugins"`
}
func (m *EngineDescription) Reset() { *m = EngineDescription{} }
func (*EngineDescription) ProtoMessage() {}
func (*EngineDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} }
type NodeDescription struct {
// Hostname of the node as reported by the agent.
// This is different from spec.meta.name which is user-defined.
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Platform of the node.
Platform *Platform `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"`
// Total resources on the node.
Resources *Resources `protobuf:"bytes,3,opt,name=resources" json:"resources,omitempty"`
// Information about the Docker Engine on the node.
Engine *EngineDescription `protobuf:"bytes,4,opt,name=engine" json:"engine,omitempty"`
}
func (m *NodeDescription) Reset() { *m = NodeDescription{} }
func (*NodeDescription) ProtoMessage() {}
func (*NodeDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} }
type RaftMemberStatus struct {
Leader bool `protobuf:"varint,1,opt,name=leader,proto3" json:"leader,omitempty"`
Reachability RaftMemberStatus_Reachability `protobuf:"varint,2,opt,name=reachability,proto3,enum=docker.cluster.api.RaftMemberStatus_Reachability" json:"reachability,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}
func (m *RaftMemberStatus) Reset() { *m = RaftMemberStatus{} }
func (*RaftMemberStatus) ProtoMessage() {}
func (*RaftMemberStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} }
type NodeStatus struct {
State NodeStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=docker.cluster.api.NodeStatus_State" json:"state,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (m *NodeStatus) Reset() { *m = NodeStatus{} }
func (*NodeStatus) ProtoMessage() {}
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{9} }
type Image struct {
// reference is a docker image reference. This can include a rpository, tag
// or be fully qualified witha digest. The format is specified in the
// distribution/reference package.
Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
}
func (m *Image) Reset() { *m = Image{} }
func (*Image) ProtoMessage() {}
func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{10} }
// VolumeTemplate describes how to create a volume when a volume is not found.
type VolumeTemplate struct {
// Annotations will be used to name and label the volume.
Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
// DriverConfig declares the driver to be used to create the volume.
DriverConfig *Driver `protobuf:"bytes,6,opt,name=driver_config,json=driverConfig" json:"driver_config,omitempty"`
}
func (m *VolumeTemplate) Reset() { *m = VolumeTemplate{} }
func (*VolumeTemplate) ProtoMessage() {}
func (*VolumeTemplate) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{11} }
// Mount describes volume mounts for a container
type Mount struct {
// Target path in container
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
// Source path to mount
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
Writable bool `protobuf:"varint,3,opt,name=writable,proto3" json:"writable,omitempty"`
// Type defines the nature of the mount.
Type Mount_MountType `protobuf:"varint,4,opt,name=type,proto3,enum=docker.cluster.api.Mount_MountType" json:"type,omitempty"`
// Propagation mode of mount
Propagation Mount_MountPropagation `protobuf:"varint,5,opt,name=propagation,proto3,enum=docker.cluster.api.Mount_MountPropagation" json:"propagation,omitempty"`
// populate volume with data from target
Populate bool `protobuf:"varint,6,opt,name=populate,proto3" json:"populate,omitempty"`
Template *VolumeTemplate `protobuf:"bytes,7,opt,name=template" json:"template,omitempty"`
}
func (m *Mount) Reset() { *m = Mount{} }
func (*Mount) ProtoMessage() {}
func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{12} }
type RestartPolicy struct {
Condition RestartPolicy_RestartCondition `protobuf:"varint,1,opt,name=condition,proto3,enum=docker.cluster.api.RestartPolicy_RestartCondition" json:"condition,omitempty"`
// Delay between restart attempts
Delay *docker_cluster_api1.Duration `protobuf:"bytes,2,opt,name=delay" json:"delay,omitempty"`
// MaxAttempts is the maximum number of restarts to attempt on an
// instance before giving up. Ignored if 0.
MaxAttempts uint64 `protobuf:"varint,3,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
// Window is the time window used to evaluate the restart policy.
// The time window is unbounded if this is 0.
Window *docker_cluster_api1.Duration `protobuf:"bytes,4,opt,name=window" json:"window,omitempty"`
}
func (m *RestartPolicy) Reset() { *m = RestartPolicy{} }
func (*RestartPolicy) ProtoMessage() {}
func (*RestartPolicy) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13} }
// UpdateConfig specifies the rate and policy of updates.
// TODO(aluzzardi): Consider making this a oneof with RollingStrategy and LockstepStrategy.
type UpdateConfig struct {
// Maximum number of tasks to be updated in one iteration.
// 0 means unlimited parallelism.
Parallelism uint64 `protobuf:"varint,1,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
// Amount of time between updates.
Delay docker_cluster_api1.Duration `protobuf:"bytes,2,opt,name=delay" json:"delay"`
}
func (m *UpdateConfig) Reset() { *m = UpdateConfig{} }
func (*UpdateConfig) ProtoMessage() {}
func (*UpdateConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{14} }
// Container specific status.
type ContainerStatus struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
PID int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
}
func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
func (*ContainerStatus) ProtoMessage() {}
func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{15} }
type TaskStatus struct {
Timestamp *docker_cluster_api.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
// State expresses the current state of the task.
State TaskState `protobuf:"varint,2,opt,name=state,proto3,enum=docker.cluster.api.TaskState" json:"state,omitempty"`
// Message reports a message for the task status. This should provide a
// human readable message that can point to how the task actually arrived
// at a current state.
//
// As a convention, we place the a small message here that led to the
// current state. For example, if the task is in ready, because it was
// prepared, we'd place "prepared" in this field. If we skipped preparation
// because the task is prepared, we would put "already prepared" in this
// field.
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// Err is set if the task is in an error state.
//
// The following states should report a companion error:
//
// FAILED, REJECTED
//
// TODO(stevvooe) Integrate this field with the error interface.
Err string `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
// Container status contains container specific status information.
//
// Types that are valid to be assigned to RuntimeStatus:
// *TaskStatus_Container
RuntimeStatus isTaskStatus_RuntimeStatus `protobuf_oneof:"runtime_status"`
}
func (m *TaskStatus) Reset() { *m = TaskStatus{} }
func (*TaskStatus) ProtoMessage() {}
func (*TaskStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{16} }
type isTaskStatus_RuntimeStatus interface {
isTaskStatus_RuntimeStatus()
MarshalTo([]byte) (int, error)
Size() int
}
type TaskStatus_Container struct {
Container *ContainerStatus `protobuf:"bytes,5,opt,name=container,oneof"`
}
func (*TaskStatus_Container) isTaskStatus_RuntimeStatus() {}
func (m *TaskStatus) GetRuntimeStatus() isTaskStatus_RuntimeStatus {
if m != nil {
return m.RuntimeStatus
}
return nil
}
func (m *TaskStatus) GetContainer() *ContainerStatus {
if x, ok := m.GetRuntimeStatus().(*TaskStatus_Container); ok {
return x.Container
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TaskStatus) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TaskStatus_OneofMarshaler, _TaskStatus_OneofUnmarshaler, _TaskStatus_OneofSizer, []interface{}{
(*TaskStatus_Container)(nil),
}
}
func _TaskStatus_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TaskStatus)
// runtime_status
switch x := m.RuntimeStatus.(type) {
case *TaskStatus_Container:
_ = b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Container); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TaskStatus.RuntimeStatus has unexpected type %T", x)
}
return nil
}
func _TaskStatus_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TaskStatus)
switch tag {
case 5: // runtime_status.container
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContainerStatus)
err := b.DecodeMessage(msg)
m.RuntimeStatus = &TaskStatus_Container{msg}
return true, err
default:
return false, nil
}
}
func _TaskStatus_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TaskStatus)
// runtime_status
switch x := m.RuntimeStatus.(type) {
case *TaskStatus_Container:
s := proto.Size(x.Container)
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// IPAMConfig specifies parameters for IP Address Management.
type IPAMConfig struct {
Family IPAMConfig_AddressFamily `protobuf:"varint,1,opt,name=family,proto3,enum=docker.cluster.api.IPAMConfig_AddressFamily" json:"family,omitempty"`
// Subnet defines a network as a CIDR address (ie network and mask
// 192.168.0.1/24).
Subnet string `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"`
// Range defines the portion of the subnet to allocate to tasks. This is
// defined as a subnet within the primary subnet.
Range string `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"`
// Gateway address within the subnet.
Gateway string `protobuf:"bytes,4,opt,name=gateway,proto3" json:"gateway,omitempty"`
// Reserved is a list of address from the master pool that should *not* be
// allocated. These addresses may have already been allocated or may be
// reserved for another allocation manager.
Reserved map[string]string `protobuf:"bytes,5,rep,name=reserved" json:"reserved,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *IPAMConfig) Reset() { *m = IPAMConfig{} }
func (*IPAMConfig) ProtoMessage() {}
func (*IPAMConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{17} }
// PortConfig specifies an exposed port which can be
// addressed using the given name. This can be later queried
// using a service discovery api or a DNS SRV query. The node
// port specifies a port that can be used to address this
// service external to the cluster by sending a connection
// request to this port to any node on the cluster.
type PortConfig struct {
// Name for the port. If provided the port information can
// be queried using the name as in a DNS SRV query.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Protocol for the port which is exposed.
Protocol PortConfig_Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=docker.cluster.api.PortConfig_Protocol" json:"protocol,omitempty"`
// The port which the application is exposing and is bound to.
Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
// SwarmPort specifies the port on which the service is
// exposed on all nodes on the cluster. If specified, the port must be
// within the SwarmPort range and available. If not specified, an available
// port is assigned.
SwarmPort uint32 `protobuf:"varint,4,opt,name=swarm_port,json=swarmPort,proto3" json:"swarm_port,omitempty"`
}
func (m *PortConfig) Reset() { *m = PortConfig{} }
func (*PortConfig) ProtoMessage() {}
func (*PortConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{18} }
// Driver is a generic driver type to be used throughout the API. For now, a
// driver is simply a name and set of options. The field contents depend on the
// target use case and driver application. For example, a network driver may
// have different rules than a volume driver.
type Driver struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *Driver) Reset() { *m = Driver{} }
func (*Driver) ProtoMessage() {}
func (*Driver) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{19} }
type IPAMOptions struct {
Driver *Driver `protobuf:"bytes,1,opt,name=driver" json:"driver,omitempty"`
Configs []*IPAMConfig `protobuf:"bytes,3,rep,name=configs" json:"configs,omitempty"`
}
func (m *IPAMOptions) Reset() { *m = IPAMOptions{} }
func (*IPAMOptions) ProtoMessage() {}
func (*IPAMOptions) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{20} }
// Peer should be used anywhere where we are describing a remote peer.
type Peer struct {
NodeID string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (m *Peer) Reset() { *m = Peer{} }
func (*Peer) ProtoMessage() {}
func (*Peer) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{21} }
// WeightedPeer should be used anywhere where we are describing a remote peer
// with a weight.
type WeightedPeer struct {
Peer *Peer `protobuf:"bytes,1,opt,name=peer" json:"peer,omitempty"`
Weight int64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"`
}
func (m *WeightedPeer) Reset() { *m = WeightedPeer{} }
func (*WeightedPeer) ProtoMessage() {}
func (*WeightedPeer) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{22} }
type IssuanceStatus struct {
State IssuanceStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=docker.cluster.api.IssuanceStatus_State" json:"state,omitempty"`
// Err is set if the Certificate Issuance is in an error state.
//
// The following states should report a companion error:
//
// FAILED, REJECTED
//
Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
}
func (m *IssuanceStatus) Reset() { *m = IssuanceStatus{} }
func (*IssuanceStatus) ProtoMessage() {}
func (*IssuanceStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} }
type AcceptancePolicy struct {
Policies []*AcceptancePolicy_RoleAdmissionPolicy `protobuf:"bytes,1,rep,name=policies" json:"policies,omitempty"`
}
func (m *AcceptancePolicy) Reset() { *m = AcceptancePolicy{} }
func (*AcceptancePolicy) ProtoMessage() {}
func (*AcceptancePolicy) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} }
type AcceptancePolicy_RoleAdmissionPolicy struct {
Role NodeRole `protobuf:"varint,1,opt,name=role,proto3,enum=docker.cluster.api.NodeRole" json:"role,omitempty"`
// Autoaccept controls which roles' certificates are automatically
// issued without administrator intervention.
Autoaccept bool `protobuf:"varint,2,opt,name=autoaccept,proto3" json:"autoaccept,omitempty"`
// Secret represents a user-provided string that is necessary for new
// nodes to join the cluster
Secret *AcceptancePolicy_RoleAdmissionPolicy_HashedSecret `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"`
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Reset() { *m = AcceptancePolicy_RoleAdmissionPolicy{} }
func (*AcceptancePolicy_RoleAdmissionPolicy) ProtoMessage() {}
func (*AcceptancePolicy_RoleAdmissionPolicy) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{24, 0}
}
type AcceptancePolicy_RoleAdmissionPolicy_HashedSecret struct {
// The actual hashed content
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// The type of hash we are using
Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"`
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_HashedSecret) Reset() {
*m = AcceptancePolicy_RoleAdmissionPolicy_HashedSecret{}
}
func (*AcceptancePolicy_RoleAdmissionPolicy_HashedSecret) ProtoMessage() {}
func (*AcceptancePolicy_RoleAdmissionPolicy_HashedSecret) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{24, 0, 0}
}
type CAConfig struct {
// NodeCertExpiry is the duration certificates should be issued for
NodeCertExpiry *docker_cluster_api1.Duration `protobuf:"bytes,1,opt,name=node_cert_expiry,json=nodeCertExpiry" json:"node_cert_expiry,omitempty"`
}
func (m *CAConfig) Reset() { *m = CAConfig{} }
func (*CAConfig) ProtoMessage() {}
func (*CAConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{25} }
// OrchestrationConfig defines cluster-level orchestration settings.
type OrchestrationConfig struct {
// TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or
// node. If negative, never remove completed or failed tasks.
TaskHistoryRetentionLimit int64 `protobuf:"varint,1,opt,name=task_history_retention_limit,json=taskHistoryRetentionLimit,proto3" json:"task_history_retention_limit,omitempty"`
}
func (m *OrchestrationConfig) Reset() { *m = OrchestrationConfig{} }
func (*OrchestrationConfig) ProtoMessage() {}
func (*OrchestrationConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{26} }
// DispatcherConfig defines cluster-level dispatcher settings.
type DispatcherConfig struct {
// HeartbeatPeriod defines how often agent should send heartbeats to
// dispatcher.
HeartbeatPeriod uint64 `protobuf:"varint,1,opt,name=heartbeat_period,json=heartbeatPeriod,proto3" json:"heartbeat_period,omitempty"`
}
func (m *DispatcherConfig) Reset() { *m = DispatcherConfig{} }
func (*DispatcherConfig) ProtoMessage() {}
func (*DispatcherConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{27} }
// RaftConfig defines raft settings for the cluster.
type RaftConfig struct {
// SnapshotInterval is the number of log entries between snapshots.
SnapshotInterval uint64 `protobuf:"varint,1,opt,name=snapshot_interval,json=snapshotInterval,proto3" json:"snapshot_interval,omitempty"`
// KeepOldSnapshots is the number of snapshots to keep beyond the
// current snapshot.
KeepOldSnapshots uint64 `protobuf:"varint,2,opt,name=keep_old_snapshots,json=keepOldSnapshots,proto3" json:"keep_old_snapshots,omitempty"`
// LogEntriesForSlowFollowers is the number of log entries to keep
// around to sync up slow followers after a snapshot is created.
LogEntriesForSlowFollowers uint64 `protobuf:"varint,3,opt,name=log_entries_for_slow_followers,json=logEntriesForSlowFollowers,proto3" json:"log_entries_for_slow_followers,omitempty"`
// HeartbeatTick defines the amount of ticks (in seconds) between
// each heartbeat message sent to other members for health-check.
HeartbeatTick uint32 `protobuf:"varint,4,opt,name=heartbeat_tick,json=heartbeatTick,proto3" json:"heartbeat_tick,omitempty"`
// ElectionTick defines the amount of ticks (in seconds) needed
// without a leader to trigger a new election.
ElectionTick uint32 `protobuf:"varint,5,opt,name=election_tick,json=electionTick,proto3" json:"election_tick,omitempty"`
}
func (m *RaftConfig) Reset() { *m = RaftConfig{} }
func (*RaftConfig) ProtoMessage() {}
func (*RaftConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{28} }