forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automation.pb.go
388 lines (334 loc) · 15.3 KB
/
automation.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
// Code generated by protoc-gen-go.
// source: automation.proto
// DO NOT EDIT!
/*
Package automation is a generated protocol buffer package.
It is generated from these files:
automation.proto
It has these top-level messages:
ClusterOperation
TaskContainer
Task
EnqueueClusterOperationRequest
EnqueueClusterOperationResponse
GetClusterOperationStateRequest
GetClusterOperationStateResponse
GetClusterOperationDetailsRequest
GetClusterOperationDetailsResponse
*/
package automation
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
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type ClusterOperationState int32
const (
ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE ClusterOperationState = 0
ClusterOperationState_CLUSTER_OPERATION_NOT_STARTED ClusterOperationState = 1
ClusterOperationState_CLUSTER_OPERATION_RUNNING ClusterOperationState = 2
ClusterOperationState_CLUSTER_OPERATION_DONE ClusterOperationState = 3
)
var ClusterOperationState_name = map[int32]string{
0: "UNKNOWN_CLUSTER_OPERATION_STATE",
1: "CLUSTER_OPERATION_NOT_STARTED",
2: "CLUSTER_OPERATION_RUNNING",
3: "CLUSTER_OPERATION_DONE",
}
var ClusterOperationState_value = map[string]int32{
"UNKNOWN_CLUSTER_OPERATION_STATE": 0,
"CLUSTER_OPERATION_NOT_STARTED": 1,
"CLUSTER_OPERATION_RUNNING": 2,
"CLUSTER_OPERATION_DONE": 3,
}
func (x ClusterOperationState) String() string {
return proto.EnumName(ClusterOperationState_name, int32(x))
}
func (ClusterOperationState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type TaskState int32
const (
TaskState_UNKNOWN_TASK_STATE TaskState = 0
TaskState_NOT_STARTED TaskState = 1
TaskState_RUNNING TaskState = 2
TaskState_DONE TaskState = 3
)
var TaskState_name = map[int32]string{
0: "UNKNOWN_TASK_STATE",
1: "NOT_STARTED",
2: "RUNNING",
3: "DONE",
}
var TaskState_value = map[string]int32{
"UNKNOWN_TASK_STATE": 0,
"NOT_STARTED": 1,
"RUNNING": 2,
"DONE": 3,
}
func (x TaskState) String() string {
return proto.EnumName(TaskState_name, int32(x))
}
func (TaskState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type ClusterOperation struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// TaskContainer are processed sequentially, one at a time.
SerialTasks []*TaskContainer `protobuf:"bytes,2,rep,name=serial_tasks,json=serialTasks" json:"serial_tasks,omitempty"`
// Cached value. This has to be re-evaluated e.g. after a checkpoint load because running tasks may have already finished.
State ClusterOperationState `protobuf:"varint,3,opt,name=state,enum=automation.ClusterOperationState" json:"state,omitempty"`
// Error of the first task which failed. Set after state advanced to CLUSTER_OPERATION_DONE. If empty, all tasks succeeded. Cached value, see state above.
Error string `protobuf:"bytes,4,opt,name=error" json:"error,omitempty"`
}
func (m *ClusterOperation) Reset() { *m = ClusterOperation{} }
func (m *ClusterOperation) String() string { return proto.CompactTextString(m) }
func (*ClusterOperation) ProtoMessage() {}
func (*ClusterOperation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *ClusterOperation) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClusterOperation) GetSerialTasks() []*TaskContainer {
if m != nil {
return m.SerialTasks
}
return nil
}
func (m *ClusterOperation) GetState() ClusterOperationState {
if m != nil {
return m.State
}
return ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE
}
func (m *ClusterOperation) GetError() string {
if m != nil {
return m.Error
}
return ""
}
// TaskContainer holds one or more task which may be executed in parallel.
// "concurrency", if > 0, limits the amount of concurrently executed tasks.
type TaskContainer struct {
ParallelTasks []*Task `protobuf:"bytes,1,rep,name=parallel_tasks,json=parallelTasks" json:"parallel_tasks,omitempty"`
Concurrency int32 `protobuf:"varint,2,opt,name=concurrency" json:"concurrency,omitempty"`
}
func (m *TaskContainer) Reset() { *m = TaskContainer{} }
func (m *TaskContainer) String() string { return proto.CompactTextString(m) }
func (*TaskContainer) ProtoMessage() {}
func (*TaskContainer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *TaskContainer) GetParallelTasks() []*Task {
if m != nil {
return m.ParallelTasks
}
return nil
}
func (m *TaskContainer) GetConcurrency() int32 {
if m != nil {
return m.Concurrency
}
return 0
}
// Task represents a specific task which should be automatically executed.
type Task struct {
// Task specification.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Runtime data.
Id string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
State TaskState `protobuf:"varint,4,opt,name=state,enum=automation.TaskState" json:"state,omitempty"`
// Set after state advanced to DONE.
Output string `protobuf:"bytes,5,opt,name=output" json:"output,omitempty"`
// Set after state advanced to DONE. If empty, the task did succeed.
Error string `protobuf:"bytes,6,opt,name=error" json:"error,omitempty"`
}
func (m *Task) Reset() { *m = Task{} }
func (m *Task) String() string { return proto.CompactTextString(m) }
func (*Task) ProtoMessage() {}
func (*Task) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Task) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Task) GetParameters() map[string]string {
if m != nil {
return m.Parameters
}
return nil
}
func (m *Task) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Task) GetState() TaskState {
if m != nil {
return m.State
}
return TaskState_UNKNOWN_TASK_STATE
}
func (m *Task) GetOutput() string {
if m != nil {
return m.Output
}
return ""
}
func (m *Task) GetError() string {
if m != nil {
return m.Error
}
return ""
}
type EnqueueClusterOperationRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *EnqueueClusterOperationRequest) Reset() { *m = EnqueueClusterOperationRequest{} }
func (m *EnqueueClusterOperationRequest) String() string { return proto.CompactTextString(m) }
func (*EnqueueClusterOperationRequest) ProtoMessage() {}
func (*EnqueueClusterOperationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *EnqueueClusterOperationRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *EnqueueClusterOperationRequest) GetParameters() map[string]string {
if m != nil {
return m.Parameters
}
return nil
}
type EnqueueClusterOperationResponse struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (m *EnqueueClusterOperationResponse) Reset() { *m = EnqueueClusterOperationResponse{} }
func (m *EnqueueClusterOperationResponse) String() string { return proto.CompactTextString(m) }
func (*EnqueueClusterOperationResponse) ProtoMessage() {}
func (*EnqueueClusterOperationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *EnqueueClusterOperationResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type GetClusterOperationStateRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (m *GetClusterOperationStateRequest) Reset() { *m = GetClusterOperationStateRequest{} }
func (m *GetClusterOperationStateRequest) String() string { return proto.CompactTextString(m) }
func (*GetClusterOperationStateRequest) ProtoMessage() {}
func (*GetClusterOperationStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *GetClusterOperationStateRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type GetClusterOperationStateResponse struct {
State ClusterOperationState `protobuf:"varint,1,opt,name=state,enum=automation.ClusterOperationState" json:"state,omitempty"`
}
func (m *GetClusterOperationStateResponse) Reset() { *m = GetClusterOperationStateResponse{} }
func (m *GetClusterOperationStateResponse) String() string { return proto.CompactTextString(m) }
func (*GetClusterOperationStateResponse) ProtoMessage() {}
func (*GetClusterOperationStateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{6}
}
func (m *GetClusterOperationStateResponse) GetState() ClusterOperationState {
if m != nil {
return m.State
}
return ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE
}
type GetClusterOperationDetailsRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (m *GetClusterOperationDetailsRequest) Reset() { *m = GetClusterOperationDetailsRequest{} }
func (m *GetClusterOperationDetailsRequest) String() string { return proto.CompactTextString(m) }
func (*GetClusterOperationDetailsRequest) ProtoMessage() {}
func (*GetClusterOperationDetailsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{7}
}
func (m *GetClusterOperationDetailsRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type GetClusterOperationDetailsResponse struct {
// Full snapshot of the execution e.g. including output of each task.
ClusterOp *ClusterOperation `protobuf:"bytes,2,opt,name=cluster_op,json=clusterOp" json:"cluster_op,omitempty"`
}
func (m *GetClusterOperationDetailsResponse) Reset() { *m = GetClusterOperationDetailsResponse{} }
func (m *GetClusterOperationDetailsResponse) String() string { return proto.CompactTextString(m) }
func (*GetClusterOperationDetailsResponse) ProtoMessage() {}
func (*GetClusterOperationDetailsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{8}
}
func (m *GetClusterOperationDetailsResponse) GetClusterOp() *ClusterOperation {
if m != nil {
return m.ClusterOp
}
return nil
}
func init() {
proto.RegisterType((*ClusterOperation)(nil), "automation.ClusterOperation")
proto.RegisterType((*TaskContainer)(nil), "automation.TaskContainer")
proto.RegisterType((*Task)(nil), "automation.Task")
proto.RegisterType((*EnqueueClusterOperationRequest)(nil), "automation.EnqueueClusterOperationRequest")
proto.RegisterType((*EnqueueClusterOperationResponse)(nil), "automation.EnqueueClusterOperationResponse")
proto.RegisterType((*GetClusterOperationStateRequest)(nil), "automation.GetClusterOperationStateRequest")
proto.RegisterType((*GetClusterOperationStateResponse)(nil), "automation.GetClusterOperationStateResponse")
proto.RegisterType((*GetClusterOperationDetailsRequest)(nil), "automation.GetClusterOperationDetailsRequest")
proto.RegisterType((*GetClusterOperationDetailsResponse)(nil), "automation.GetClusterOperationDetailsResponse")
proto.RegisterEnum("automation.ClusterOperationState", ClusterOperationState_name, ClusterOperationState_value)
proto.RegisterEnum("automation.TaskState", TaskState_name, TaskState_value)
}
func init() { proto.RegisterFile("automation.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 562 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdb, 0x6a, 0xdb, 0x4c,
0x14, 0x85, 0x7f, 0xc9, 0x87, 0xbf, 0xde, 0x6a, 0x1c, 0x31, 0x34, 0x46, 0x09, 0x4d, 0x23, 0xab,
0x37, 0x26, 0x05, 0x43, 0x9d, 0x8b, 0x94, 0xb4, 0x85, 0x1a, 0x5b, 0x84, 0xe0, 0x22, 0x85, 0xb1,
0x4c, 0xa1, 0xbd, 0x30, 0x53, 0x67, 0x2e, 0x54, 0xcb, 0x92, 0x32, 0x33, 0x2a, 0xf8, 0x05, 0xfa,
0x10, 0x7d, 0x89, 0x3e, 0x4a, 0x5f, 0xa9, 0xe8, 0x64, 0xcb, 0xf2, 0x01, 0x4a, 0xef, 0x34, 0x5b,
0x6b, 0xaf, 0xbd, 0xe6, 0xb3, 0xb7, 0x40, 0x25, 0x91, 0x08, 0x16, 0x44, 0xb8, 0x81, 0xdf, 0x0d,
0x59, 0x20, 0x02, 0x04, 0xeb, 0x8a, 0xf1, 0x4b, 0x02, 0x75, 0xe0, 0x45, 0x5c, 0x50, 0x66, 0x87,
0x94, 0x25, 0x45, 0xd4, 0x04, 0xd9, 0x7d, 0xd0, 0x24, 0x5d, 0xea, 0x34, 0xb0, 0xec, 0x3e, 0xa0,
0x77, 0xf0, 0x94, 0x53, 0xe6, 0x12, 0x6f, 0x2a, 0x08, 0x9f, 0x73, 0x4d, 0xd6, 0x2b, 0x1d, 0xa5,
0x77, 0xda, 0x2d, 0x38, 0x3b, 0x84, 0xcf, 0x07, 0x81, 0x2f, 0x88, 0xeb, 0x53, 0x86, 0x95, 0x54,
0x1e, 0x17, 0x39, 0xba, 0x86, 0x1a, 0x17, 0x44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