dkron-ruby 1.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOP.md +599 -596
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +8 -4
- data/dkron-ruby.gemspec +1 -0
- data/docs/DefaultApi.md +81 -0
- data/docs/Job.md +1 -1
- data/docs/JobsApi.md +49 -2
- data/docs/Restore.md +7 -0
- data/lib/dkron-ruby.rb +4 -3
- data/lib/dkron-ruby/api/default_api.rb +94 -3
- data/lib/dkron-ruby/api/executions_api.rb +3 -3
- data/lib/dkron-ruby/api/jobs_api.rb +58 -5
- data/lib/dkron-ruby/api/members_api.rb +3 -3
- data/lib/dkron-ruby/api_client.rb +6 -6
- data/lib/dkron-ruby/api_error.rb +3 -3
- data/lib/dkron-ruby/configuration.rb +5 -5
- data/lib/dkron-ruby/models/execution.rb +3 -3
- data/lib/dkron-ruby/models/job.rb +4 -4
- data/lib/dkron-ruby/models/member.rb +3 -3
- data/lib/dkron-ruby/models/processors.rb +3 -3
- data/lib/dkron-ruby/models/restore.rb +176 -0
- data/lib/dkron-ruby/models/status.rb +3 -3
- data/lib/dkron-ruby/version.rb +4 -4
- data/spec/api/default_api_spec.rb +23 -3
- data/spec/api/executions_api_spec.rb +3 -3
- data/spec/api/jobs_api_spec.rb +15 -4
- data/spec/api/members_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/execution_spec.rb +3 -3
- data/spec/models/job_spec.rb +3 -3
- data/spec/models/member_spec.rb +3 -3
- data/spec/models/processors_spec.rb +3 -3
- data/spec/models/restore_spec.rb +35 -0
- data/spec/models/status_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -3
- data/swagger.json +656 -0
- metadata +27 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6f0d6dbea773e832a83a24a967b0f292f2e579122239e1288369f34f3388688
|
4
|
+
data.tar.gz: 0d4f2b5752b5a3fd2b2d8bca591fa36e231b17fd1df19188531fd012c14ccccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccf06feb2f57b6e7f15970d494ef942dae9c41043909304e3783ebe199b08a7df6a1f92b8dd7cd3d6e67d9a089d66a88e6e4639c8542b5bb0a9e91d4f1d7601d
|
7
|
+
data.tar.gz: eadb6cc241bca1a7b09ec8d1079e102bff91c2f980ae58fd6729a8151a772d247b515860e1068c280634a083d5c2ee1279c9e16f3f834bb9672b8a1ace8e8d44
|
data/DEVELOP.md
CHANGED
@@ -1,596 +1,599 @@
|
|
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
|
-
|
1
|
+
1. Download latest Swagger spec: https://dkron.io/swagger.yaml
|
2
|
+
2. `POST` to https://generator.swagger.io/api/gen/clients/ruby with body (replace spec with latest from above):
|
3
|
+
```json
|
4
|
+
{
|
5
|
+
"options":{
|
6
|
+
"gemName":"dkron-ruby",
|
7
|
+
"moduleName":"Dkron"
|
8
|
+
},
|
9
|
+
"spec":{
|
10
|
+
"swagger":"2.0",
|
11
|
+
"basePath":"/v1",
|
12
|
+
"host":"localhost:8080",
|
13
|
+
"consumes":[
|
14
|
+
"application/json"
|
15
|
+
],
|
16
|
+
"produces":[
|
17
|
+
"application/json"
|
18
|
+
],
|
19
|
+
"schemes":[
|
20
|
+
"http"
|
21
|
+
],
|
22
|
+
"info":{
|
23
|
+
"version":"2.2",
|
24
|
+
"title":"Dkron REST API",
|
25
|
+
"description":"You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`.\n\nDkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port.\n\nDefault API responses are unformatted JSON add the `pretty=true` param to format the response.\n"
|
26
|
+
},
|
27
|
+
"paths":{
|
28
|
+
"/":{
|
29
|
+
"get":{
|
30
|
+
"description":"Gets `Status` object.\n",
|
31
|
+
"operationId":"status",
|
32
|
+
"tags":[
|
33
|
+
"default"
|
34
|
+
],
|
35
|
+
"responses":{
|
36
|
+
"200":{
|
37
|
+
"description":"Successful response",
|
38
|
+
"schema":{
|
39
|
+
"$ref":"#/definitions/status"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"/jobs":{
|
46
|
+
"get":{
|
47
|
+
"description":"List jobs.\n",
|
48
|
+
"parameters":[
|
49
|
+
{
|
50
|
+
"in":"query",
|
51
|
+
"name":"metadata",
|
52
|
+
"type":"array",
|
53
|
+
"collectionFormat":"multi",
|
54
|
+
"items":{
|
55
|
+
"type":"string"
|
56
|
+
},
|
57
|
+
"description":"Filter jobs by metadata"
|
58
|
+
}
|
59
|
+
],
|
60
|
+
"operationId":"getJobs",
|
61
|
+
"tags":[
|
62
|
+
"jobs"
|
63
|
+
],
|
64
|
+
"responses":{
|
65
|
+
"200":{
|
66
|
+
"description":"Successful response",
|
67
|
+
"schema":{
|
68
|
+
"type":"array",
|
69
|
+
"items":{
|
70
|
+
"$ref":"#/definitions/job"
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
"post":{
|
77
|
+
"description":"Create or updates a new job.\n",
|
78
|
+
"operationId":"createOrUpdateJob",
|
79
|
+
"tags":[
|
80
|
+
"jobs"
|
81
|
+
],
|
82
|
+
"parameters":[
|
83
|
+
{
|
84
|
+
"in":"body",
|
85
|
+
"name":"body",
|
86
|
+
"description":"Updated job object",
|
87
|
+
"required":true,
|
88
|
+
"schema":{
|
89
|
+
"$ref":"#/definitions/job"
|
90
|
+
}
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"in":"query",
|
94
|
+
"name":"runoncreate",
|
95
|
+
"description":"If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.",
|
96
|
+
"required":false,
|
97
|
+
"schema":{
|
98
|
+
"type":"boolean"
|
99
|
+
},
|
100
|
+
"allowEmptyValue":true
|
101
|
+
}
|
102
|
+
],
|
103
|
+
"responses":{
|
104
|
+
"201":{
|
105
|
+
"description":"Successful response",
|
106
|
+
"schema":{
|
107
|
+
"$ref":"#/definitions/job"
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
},
|
113
|
+
"/jobs/{job_name}":{
|
114
|
+
"get":{
|
115
|
+
"description":"Show a job.\n",
|
116
|
+
"operationId":"showJobByName",
|
117
|
+
"tags":[
|
118
|
+
"jobs"
|
119
|
+
],
|
120
|
+
"parameters":[
|
121
|
+
{
|
122
|
+
"in":"path",
|
123
|
+
"name":"job_name",
|
124
|
+
"description":"The job that needs to be fetched.",
|
125
|
+
"required":true,
|
126
|
+
"type":"string"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"responses":{
|
130
|
+
"200":{
|
131
|
+
"description":"Successful response",
|
132
|
+
"schema":{
|
133
|
+
"$ref":"#/definitions/job"
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
},
|
138
|
+
"delete":{
|
139
|
+
"description":"Delete a job.\n",
|
140
|
+
"operationId":"deleteJob",
|
141
|
+
"tags":[
|
142
|
+
"jobs"
|
143
|
+
],
|
144
|
+
"parameters":[
|
145
|
+
{
|
146
|
+
"in":"path",
|
147
|
+
"name":"job_name",
|
148
|
+
"description":"The job that needs to be deleted.",
|
149
|
+
"required":true,
|
150
|
+
"type":"string"
|
151
|
+
}
|
152
|
+
],
|
153
|
+
"responses":{
|
154
|
+
"200":{
|
155
|
+
"description":"Successful response",
|
156
|
+
"schema":{
|
157
|
+
"$ref":"#/definitions/job"
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"post":{
|
163
|
+
"description":"Executes a job.\n",
|
164
|
+
"operationId":"runJob",
|
165
|
+
"tags":[
|
166
|
+
"jobs"
|
167
|
+
],
|
168
|
+
"parameters":[
|
169
|
+
{
|
170
|
+
"in":"path",
|
171
|
+
"name":"job_name",
|
172
|
+
"description":"The job that needs to be run.",
|
173
|
+
"required":true,
|
174
|
+
"type":"string"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"responses":{
|
178
|
+
"202":{
|
179
|
+
"description":"Successful response",
|
180
|
+
"schema":{
|
181
|
+
"$ref":"#/definitions/job"
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
},
|
187
|
+
"/jobs/{job_name}/toggle":{
|
188
|
+
"post":{
|
189
|
+
"description":"Toggle a job.\n",
|
190
|
+
"operationId":"toggleJob",
|
191
|
+
"tags":[
|
192
|
+
"jobs"
|
193
|
+
],
|
194
|
+
"parameters":[
|
195
|
+
{
|
196
|
+
"in":"path",
|
197
|
+
"name":"job_name",
|
198
|
+
"description":"The job that needs to be toggled.",
|
199
|
+
"required":true,
|
200
|
+
"type":"string"
|
201
|
+
}
|
202
|
+
],
|
203
|
+
"responses":{
|
204
|
+
"200":{
|
205
|
+
"description":"Successful response",
|
206
|
+
"schema":{
|
207
|
+
"$ref":"#/definitions/job"
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
},
|
213
|
+
"/members":{
|
214
|
+
"get":{
|
215
|
+
"description":"List members.\n",
|
216
|
+
"operationId":"getMember",
|
217
|
+
"tags":[
|
218
|
+
"members"
|
219
|
+
],
|
220
|
+
"responses":{
|
221
|
+
"200":{
|
222
|
+
"description":"Successful response",
|
223
|
+
"schema":{
|
224
|
+
"type":"array",
|
225
|
+
"items":{
|
226
|
+
"$ref":"#/definitions/member"
|
227
|
+
}
|
228
|
+
}
|
229
|
+
}
|
230
|
+
}
|
231
|
+
}
|
232
|
+
},
|
233
|
+
"/leader":{
|
234
|
+
"get":{
|
235
|
+
"description":"List leader of cluster.\n",
|
236
|
+
"operationId":"getLeader",
|
237
|
+
"tags":[
|
238
|
+
"default"
|
239
|
+
],
|
240
|
+
"responses":{
|
241
|
+
"200":{
|
242
|
+
"description":"Successful response",
|
243
|
+
"schema":{
|
244
|
+
"$ref":"#/definitions/member"
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
},
|
250
|
+
"/leave":{
|
251
|
+
"post":{
|
252
|
+
"description":"Force the node to leave the cluster.\n",
|
253
|
+
"operationId":"leave",
|
254
|
+
"tags":[
|
255
|
+
"default"
|
256
|
+
],
|
257
|
+
"responses":{
|
258
|
+
"200":{
|
259
|
+
"description":"Successful response",
|
260
|
+
"schema":{
|
261
|
+
"type":"array",
|
262
|
+
"items":{
|
263
|
+
"$ref":"#/definitions/member"
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"/jobs/{job_name}/executions":{
|
271
|
+
"get":{
|
272
|
+
"description":"List executions.\n",
|
273
|
+
"operationId":"listExecutionsByJob",
|
274
|
+
"tags":[
|
275
|
+
"executions"
|
276
|
+
],
|
277
|
+
"parameters":[
|
278
|
+
{
|
279
|
+
"in":"path",
|
280
|
+
"name":"job_name",
|
281
|
+
"description":"The job that owns the executions to be fetched.",
|
282
|
+
"required":true,
|
283
|
+
"type":"string"
|
284
|
+
}
|
285
|
+
],
|
286
|
+
"responses":{
|
287
|
+
"200":{
|
288
|
+
"description":"Successful response",
|
289
|
+
"schema":{
|
290
|
+
"type":"array",
|
291
|
+
"items":{
|
292
|
+
"$ref":"#/definitions/execution"
|
293
|
+
}
|
294
|
+
}
|
295
|
+
}
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
},
|
300
|
+
"definitions":{
|
301
|
+
"status":{
|
302
|
+
"type":"object",
|
303
|
+
"description":"Status represents details about the node.",
|
304
|
+
"readOnly":true,
|
305
|
+
"properties":{
|
306
|
+
"agent":{
|
307
|
+
"description":"Node basic details",
|
308
|
+
"readOnly":true,
|
309
|
+
"additionalProperties":{
|
310
|
+
"type":"object"
|
311
|
+
}
|
312
|
+
},
|
313
|
+
"serf":{
|
314
|
+
"description":"Serf status",
|
315
|
+
"readOnly":true,
|
316
|
+
"additionalProperties":{
|
317
|
+
"type":"object"
|
318
|
+
}
|
319
|
+
},
|
320
|
+
"tags":{
|
321
|
+
"description":"Tags asociated with this node",
|
322
|
+
"readOnly":true,
|
323
|
+
"additionalProperties":{
|
324
|
+
"type":"string"
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
},
|
329
|
+
"job":{
|
330
|
+
"type":"object",
|
331
|
+
"description":"A Job represents a scheduled task to execute.",
|
332
|
+
"required":[
|
333
|
+
"name",
|
334
|
+
"schedule"
|
335
|
+
],
|
336
|
+
"properties":{
|
337
|
+
"name":{
|
338
|
+
"type":"string",
|
339
|
+
"description":"Name for the job.",
|
340
|
+
"readOnly":false,
|
341
|
+
"example":"job1"
|
342
|
+
},
|
343
|
+
"displayname":{
|
344
|
+
"type":"string",
|
345
|
+
"description":"Nice name for the job. Optional.",
|
346
|
+
"readOnly":false
|
347
|
+
},
|
348
|
+
"schedule":{
|
349
|
+
"type":"string",
|
350
|
+
"description":"Cron expression for the job.",
|
351
|
+
"readOnly":false,
|
352
|
+
"example":"@every 10s"
|
353
|
+
},
|
354
|
+
"timezone":{
|
355
|
+
"type":"string",
|
356
|
+
"description":"Timezone where the job will be executed. By default and when field is set to empty string, the job will run in local time.",
|
357
|
+
"readOnly":false,
|
358
|
+
"example":"Europe/Berlin"
|
359
|
+
},
|
360
|
+
"owner":{
|
361
|
+
"type":"string",
|
362
|
+
"description":"Owner of the job",
|
363
|
+
"readOnly":false,
|
364
|
+
"example":"Platform Team"
|
365
|
+
},
|
366
|
+
"owner_email":{
|
367
|
+
"type":"string",
|
368
|
+
"description":"Email of the owner",
|
369
|
+
"readOnly":false,
|
370
|
+
"example":"platform@example.com"
|
371
|
+
},
|
372
|
+
"success_count":{
|
373
|
+
"type":"integer",
|
374
|
+
"description":"Number of successful executions",
|
375
|
+
"readOnly":true
|
376
|
+
},
|
377
|
+
"error_count":{
|
378
|
+
"type":"integer",
|
379
|
+
"description":"Number of failed executions",
|
380
|
+
"readOnly":true
|
381
|
+
},
|
382
|
+
"last_success":{
|
383
|
+
"type":"string",
|
384
|
+
"format":"date-time",
|
385
|
+
"description":"Last time this job executed successfully",
|
386
|
+
"readOnly":true
|
387
|
+
},
|
388
|
+
"last_error":{
|
389
|
+
"type":"string",
|
390
|
+
"format":"date-time",
|
391
|
+
"description":"Last time this job failed",
|
392
|
+
"readOnly":true
|
393
|
+
},
|
394
|
+
"disabled":{
|
395
|
+
"type":"boolean",
|
396
|
+
"description":"Disabled state of the job",
|
397
|
+
"readOnly":false
|
398
|
+
},
|
399
|
+
"tags":{
|
400
|
+
"type":"object",
|
401
|
+
"description":"Target nodes tags of this job",
|
402
|
+
"additionalProperties":{
|
403
|
+
"type":"string"
|
404
|
+
},
|
405
|
+
"readOnly":false,
|
406
|
+
"example":{
|
407
|
+
"server":"true"
|
408
|
+
}
|
409
|
+
},
|
410
|
+
"metadata":{
|
411
|
+
"type":"object",
|
412
|
+
"description":"Extra metadata tags for this job",
|
413
|
+
"additionalProperties":{
|
414
|
+
"type":"string"
|
415
|
+
},
|
416
|
+
"readOnly":false,
|
417
|
+
"example":{
|
418
|
+
"office":"Barcelona"
|
419
|
+
}
|
420
|
+
},
|
421
|
+
"retries":{
|
422
|
+
"type":"integer",
|
423
|
+
"description":"Number of times to retry a failed job execution",
|
424
|
+
"example":2,
|
425
|
+
"readOnly":false
|
426
|
+
},
|
427
|
+
"parent_job":{
|
428
|
+
"type":"string",
|
429
|
+
"description":"The name/id of the job that will trigger the execution of this job",
|
430
|
+
"example":"parent_job",
|
431
|
+
"readOnly":false
|
432
|
+
},
|
433
|
+
"dependent_jobs":{
|
434
|
+
"type":"array",
|
435
|
+
"items":{
|
436
|
+
"type":"string"
|
437
|
+
},
|
438
|
+
"description":"Array containing the jobs that depends on this one",
|
439
|
+
"example":[
|
440
|
+
"dependent_job"
|
441
|
+
],
|
442
|
+
"readOnly":true
|
443
|
+
},
|
444
|
+
"processors":{
|
445
|
+
"$ref":"#/definitions/processors"
|
446
|
+
},
|
447
|
+
"concurrency":{
|
448
|
+
"type":"string",
|
449
|
+
"description":"Concurrency policy for the job allow/forbid",
|
450
|
+
"example":"allow",
|
451
|
+
"readOnly":false
|
452
|
+
},
|
453
|
+
"executor":{
|
454
|
+
"type":"string",
|
455
|
+
"description":"Executor plugin used to run the job",
|
456
|
+
"readOnly":false,
|
457
|
+
"example":"shell"
|
458
|
+
},
|
459
|
+
"executor_config":{
|
460
|
+
"type":"object",
|
461
|
+
"description":"Executor plugin parameters",
|
462
|
+
"additionalProperties":{
|
463
|
+
"type":"string"
|
464
|
+
},
|
465
|
+
"example":{
|
466
|
+
"command":"echo 'Hello from Dkron'"
|
467
|
+
}
|
468
|
+
},
|
469
|
+
"status":{
|
470
|
+
"type":"string",
|
471
|
+
"readOnly":true,
|
472
|
+
"description":"Status of the job",
|
473
|
+
"example":"success"
|
474
|
+
}
|
475
|
+
}
|
476
|
+
},
|
477
|
+
"member":{
|
478
|
+
"type":"object",
|
479
|
+
"description":"A member represents a cluster member node.",
|
480
|
+
"properties":{
|
481
|
+
"Name":{
|
482
|
+
"type":"string",
|
483
|
+
"description":"Node name",
|
484
|
+
"example":"dkron1"
|
485
|
+
},
|
486
|
+
"Addr":{
|
487
|
+
"type":"string",
|
488
|
+
"description":"IP Address",
|
489
|
+
"example":"192.168.1.137"
|
490
|
+
},
|
491
|
+
"Port":{
|
492
|
+
"type":"integer",
|
493
|
+
"description":"Port number",
|
494
|
+
"example":8946
|
495
|
+
},
|
496
|
+
"Tags":{
|
497
|
+
"type":"object",
|
498
|
+
"description":"Tags asociated with this node",
|
499
|
+
"additionalProperties":{
|
500
|
+
"type":"string"
|
501
|
+
},
|
502
|
+
"example":{
|
503
|
+
"rpc_addr":"192.168.1.137:6868",
|
504
|
+
"server":"true",
|
505
|
+
"version\"":"1.0.0"
|
506
|
+
}
|
507
|
+
},
|
508
|
+
"Status":{
|
509
|
+
"type":"integer",
|
510
|
+
"description":"The serf status of the node see: https://godoc.org/github.com/hashicorp/serf/serf#MemberStatus",
|
511
|
+
"example":1
|
512
|
+
},
|
513
|
+
"ProtocolMin":{
|
514
|
+
"type":"integer",
|
515
|
+
"description":"Serf protocol minimum version this node can understand or speak",
|
516
|
+
"example":5
|
517
|
+
},
|
518
|
+
"ProtocolMax":{
|
519
|
+
"type":"integer",
|
520
|
+
"description":"Serf protocol maximum version this node can understand or speak",
|
521
|
+
"example":2
|
522
|
+
},
|
523
|
+
"ProtocolCur":{
|
524
|
+
"type":"integer",
|
525
|
+
"description":"Serf protocol current version this node can understand or speak",
|
526
|
+
"example":2
|
527
|
+
},
|
528
|
+
"DelegateMin":{
|
529
|
+
"type":"integer",
|
530
|
+
"description":"Serf delegate protocol minimum version this node can understand or speak"
|
531
|
+
},
|
532
|
+
"DelegateMax":{
|
533
|
+
"type":"integer",
|
534
|
+
"description":"Serf delegate protocol maximum version this node can understand or speak",
|
535
|
+
"example":5
|
536
|
+
},
|
537
|
+
"DelegateCur":{
|
538
|
+
"type":"integer",
|
539
|
+
"description":"Serf delegate protocol current version this node can understand or speak",
|
540
|
+
"example":4
|
541
|
+
}
|
542
|
+
}
|
543
|
+
},
|
544
|
+
"execution":{
|
545
|
+
"type":"object",
|
546
|
+
"description":"An execution represents a timed job run.",
|
547
|
+
"properties":{
|
548
|
+
"job_name":{
|
549
|
+
"type":"string",
|
550
|
+
"description":"job name",
|
551
|
+
"example":"job_1"
|
552
|
+
},
|
553
|
+
"started_at":{
|
554
|
+
"type":"string",
|
555
|
+
"format":"date-time",
|
556
|
+
"description":"start time of the execution"
|
557
|
+
},
|
558
|
+
"finished_at":{
|
559
|
+
"type":"string",
|
560
|
+
"format":"date-time",
|
561
|
+
"description":"when the execution finished running"
|
562
|
+
},
|
563
|
+
"success":{
|
564
|
+
"type":"boolean",
|
565
|
+
"description":"the execution run successfuly"
|
566
|
+
},
|
567
|
+
"output":{
|
568
|
+
"type":"string",
|
569
|
+
"description":"partial output of the command execution",
|
570
|
+
"example":"Hello from Dkron"
|
571
|
+
},
|
572
|
+
"node_name":{
|
573
|
+
"type":"string",
|
574
|
+
"description":"name of the node that executed the command",
|
575
|
+
"example":"dkron1"
|
576
|
+
}
|
577
|
+
}
|
578
|
+
},
|
579
|
+
"processors":{
|
580
|
+
"type":"object",
|
581
|
+
"description":"Processor plugins used to process executions results of this job",
|
582
|
+
"additionalProperties":{
|
583
|
+
"type":"object",
|
584
|
+
"additionalProperties":{
|
585
|
+
"type":"string"
|
586
|
+
}
|
587
|
+
},
|
588
|
+
"example":{
|
589
|
+
"files":{
|
590
|
+
"forward":true
|
591
|
+
}
|
592
|
+
}
|
593
|
+
}
|
594
|
+
}
|
595
|
+
}
|
596
|
+
}
|
597
|
+
```
|
598
|
+
3. Generate new gem with `gem build dkron-ruby.gemspec`
|
599
|
+
4. Publish gem with `gem push [gemfile]`
|