dkron-rb 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/Gemfile.lock +30 -28
- data/README.md +13 -8
- data/Rakefile +9 -3
- data/config.json +1 -1
- data/dkron-rb.gemspec +8 -17
- data/docs/DefaultApi.md +1 -1
- data/docs/ExecutionsApi.md +1 -1
- data/docs/ExecutorConfig.md +7 -0
- data/docs/ExecutorShell.md +10 -0
- data/docs/Job.md +5 -4
- data/docs/Member.md +3 -3
- data/docs/ProcessorFiles.md +9 -0
- data/docs/ProcessorLog.md +8 -0
- data/docs/ProcessorSyslog.md +8 -0
- data/docs/Processors.md +7 -0
- data/git_push.sh +1 -13
- data/lib/dkron-rb.rb +10 -4
- data/lib/dkron-rb/api/default_api.rb +13 -36
- data/lib/dkron-rb/api/executions_api.rb +8 -21
- data/lib/dkron-rb/api/jobs_api.rb +29 -52
- data/lib/dkron-rb/api/members_api.rb +5 -20
- data/lib/dkron-rb/api_client.rb +55 -45
- data/lib/dkron-rb/api_error.rb +9 -18
- data/lib/dkron-rb/configuration.rb +8 -13
- data/lib/dkron-rb/models/execution.rb +6 -17
- data/lib/dkron-rb/models/executor_config.rb +179 -0
- data/lib/dkron-rb/models/executor_shell.rb +208 -0
- data/lib/dkron-rb/models/job.rb +48 -46
- data/lib/dkron-rb/models/member.rb +10 -20
- data/lib/dkron-rb/models/processor_files.rb +198 -0
- data/lib/dkron-rb/models/processor_log.rb +189 -0
- data/lib/dkron-rb/models/processor_syslog.rb +189 -0
- data/lib/dkron-rb/models/processors.rb +179 -0
- data/lib/dkron-rb/models/status.rb +6 -17
- data/lib/dkron-rb/version.rb +3 -14
- data/pkg/dkron-rb-0.9.2.gem +0 -0
- data/seeds.rb +5 -2
- data/spec/models/executor_config_spec.rb +36 -0
- data/spec/models/executor_shell_spec.rb +54 -0
- data/spec/models/processor_files_spec.rb +48 -0
- data/spec/models/processor_log_spec.rb +42 -0
- data/spec/models/processor_syslog_spec.rb +42 -0
- data/spec/models/processors_spec.rb +36 -0
- metadata +46 -25
- data/dkron-rb-0.0.1.gem +0 -0
- data/dkron-rb-0.0.2.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47418ee23ef236ea3215e047e52b34818540f7a
|
4
|
+
data.tar.gz: 19dc87903a8869b13649e4b24866227f63d39f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0fcba3dff41e977d1269f1942a24ac5c42152d531f04d19cb6e0c362f263defcef7534d133bc980527a0f1f80fbc4db49ac74e6d23bd404fe9588d359d9ce06
|
7
|
+
data.tar.gz: f460616e1582573745ee7514c03a7057b84568c10a45c185caf8f1575a1582371770a605165d777c41065b21672c265d02ee4843f37774bd8199eadc2ac937dd
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dkron-rb (0.0
|
5
|
-
json (~> 1
|
6
|
-
typhoeus (~> 0
|
4
|
+
dkron-rb (0.10.0)
|
5
|
+
json (~> 2.1, >= 2.1.0)
|
6
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -12,37 +12,38 @@ GEM
|
|
12
12
|
addressable (2.4.0)
|
13
13
|
autotest (4.4.6)
|
14
14
|
ZenTest (>= 4.4.1)
|
15
|
-
autotest-fsevent (0.2.
|
15
|
+
autotest-fsevent (0.2.13)
|
16
16
|
sys-uname
|
17
17
|
autotest-growl (0.2.16)
|
18
18
|
autotest-rails-pure (4.1.2)
|
19
19
|
crack (0.4.3)
|
20
20
|
safe_yaml (~> 1.0.0)
|
21
|
-
diff-lcs (1.
|
22
|
-
ethon (0.
|
21
|
+
diff-lcs (1.3)
|
22
|
+
ethon (0.11.0)
|
23
23
|
ffi (>= 1.3.0)
|
24
|
-
ffi (1.9.
|
24
|
+
ffi (1.9.23)
|
25
25
|
hashdiff (0.3.0)
|
26
|
-
json (1.
|
27
|
-
|
28
|
-
|
29
|
-
rspec-
|
30
|
-
rspec-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
json (2.1.0)
|
27
|
+
rake (12.0.0)
|
28
|
+
rspec (3.7.0)
|
29
|
+
rspec-core (~> 3.7.0)
|
30
|
+
rspec-expectations (~> 3.7.0)
|
31
|
+
rspec-mocks (~> 3.7.0)
|
32
|
+
rspec-core (3.7.1)
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-expectations (3.7.0)
|
34
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
-
rspec-support (~> 3.
|
36
|
-
rspec-mocks (3.
|
36
|
+
rspec-support (~> 3.7.0)
|
37
|
+
rspec-mocks (3.7.0)
|
37
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-support (3.
|
39
|
+
rspec-support (~> 3.7.0)
|
40
|
+
rspec-support (3.7.1)
|
40
41
|
safe_yaml (1.0.4)
|
41
|
-
sys-uname (1.0.
|
42
|
+
sys-uname (1.0.3)
|
42
43
|
ffi (>= 1.0.0)
|
43
|
-
typhoeus (
|
44
|
-
ethon (>= 0.
|
45
|
-
vcr (
|
44
|
+
typhoeus (1.3.0)
|
45
|
+
ethon (>= 0.9.0)
|
46
|
+
vcr (3.0.3)
|
46
47
|
webmock (1.24.6)
|
47
48
|
addressable (>= 2.3.6)
|
48
49
|
crack (>= 0.3.2)
|
@@ -53,13 +54,14 @@ PLATFORMS
|
|
53
54
|
|
54
55
|
DEPENDENCIES
|
55
56
|
autotest (~> 4.4, >= 4.4.6)
|
56
|
-
autotest-fsevent (~> 0.2, >= 0.2.
|
57
|
+
autotest-fsevent (~> 0.2, >= 0.2.12)
|
57
58
|
autotest-growl (~> 0.2, >= 0.2.16)
|
58
59
|
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
59
60
|
dkron-rb!
|
60
|
-
|
61
|
-
|
62
|
-
|
61
|
+
rake (~> 12.0.0)
|
62
|
+
rspec (~> 3.6, >= 3.6.0)
|
63
|
+
vcr (~> 3.0, >= 3.0.1)
|
64
|
+
webmock (~> 1.24, >= 1.24.3)
|
63
65
|
|
64
66
|
BUNDLED WITH
|
65
|
-
1.
|
67
|
+
1.14.4
|
data/README.md
CHANGED
@@ -6,10 +6,9 @@ You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes u
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
|
-
- API version: 0.
|
10
|
-
- Package version: 0.0
|
11
|
-
- Build
|
12
|
-
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
9
|
+
- API version: 0.10.0
|
10
|
+
- Package version: 0.10.0
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
13
12
|
|
14
13
|
## Installation
|
15
14
|
|
@@ -24,15 +23,15 @@ gem build dkron-rb.gemspec
|
|
24
23
|
Then either install the gem locally:
|
25
24
|
|
26
25
|
```shell
|
27
|
-
gem install ./dkron-rb-0.0.
|
26
|
+
gem install ./dkron-rb-0.10.0.gem
|
28
27
|
```
|
29
|
-
(for development, run `gem install --dev ./dkron-rb-0.0.
|
28
|
+
(for development, run `gem install --dev ./dkron-rb-0.10.0.gem` to install the development dependencies)
|
30
29
|
|
31
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
31
|
|
33
32
|
Finally add this to the Gemfile:
|
34
33
|
|
35
|
-
gem 'dkron-rb', '~> 0.0
|
34
|
+
gem 'dkron-rb', '~> 0.10.0'
|
36
35
|
|
37
36
|
### Install from Git
|
38
37
|
|
@@ -75,7 +74,7 @@ Class | Method | HTTP request | Description
|
|
75
74
|
*Dkron::DefaultApi* | [**get_leader**](docs/DefaultApi.md#get_leader) | **GET** /leader |
|
76
75
|
*Dkron::DefaultApi* | [**leave**](docs/DefaultApi.md#leave) | **GET** /leave |
|
77
76
|
*Dkron::DefaultApi* | [**status**](docs/DefaultApi.md#status) | **GET** / |
|
78
|
-
*Dkron::ExecutionsApi* | [**list_executions_by_job**](docs/ExecutionsApi.md#list_executions_by_job) | **GET** /
|
77
|
+
*Dkron::ExecutionsApi* | [**list_executions_by_job**](docs/ExecutionsApi.md#list_executions_by_job) | **GET** /jobs/{job_name}/executions |
|
79
78
|
*Dkron::JobsApi* | [**create_or_update_job**](docs/JobsApi.md#create_or_update_job) | **POST** /jobs |
|
80
79
|
*Dkron::JobsApi* | [**delete_job**](docs/JobsApi.md#delete_job) | **DELETE** /jobs/{job_name} |
|
81
80
|
*Dkron::JobsApi* | [**get_jobs**](docs/JobsApi.md#get_jobs) | **GET** /jobs |
|
@@ -87,8 +86,14 @@ Class | Method | HTTP request | Description
|
|
87
86
|
## Documentation for Models
|
88
87
|
|
89
88
|
- [Dkron::Execution](docs/Execution.md)
|
89
|
+
- [Dkron::ExecutorConfig](docs/ExecutorConfig.md)
|
90
|
+
- [Dkron::ExecutorShell](docs/ExecutorShell.md)
|
90
91
|
- [Dkron::Job](docs/Job.md)
|
91
92
|
- [Dkron::Member](docs/Member.md)
|
93
|
+
- [Dkron::ProcessorFiles](docs/ProcessorFiles.md)
|
94
|
+
- [Dkron::ProcessorLog](docs/ProcessorLog.md)
|
95
|
+
- [Dkron::ProcessorSyslog](docs/ProcessorSyslog.md)
|
96
|
+
- [Dkron::Processors](docs/Processors.md)
|
92
97
|
- [Dkron::Status](docs/Status.md)
|
93
98
|
|
94
99
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
begin
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
task default: :spec
|
6
|
+
rescue LoadError
|
7
|
+
# no rspec available
|
8
|
+
end
|
3
9
|
|
4
10
|
task(:codegen) do
|
5
|
-
sh('swagger-codegen', 'generate', '-i', '
|
11
|
+
sh('swagger-codegen', 'generate', '-i', 'https://dkron.io/swagger.yaml', '-l', 'ruby', '-o', '.', '-c', 'config.json')
|
6
12
|
end
|
data/config.json
CHANGED
data/dkron-rb.gemspec
CHANGED
@@ -5,21 +5,10 @@
|
|
5
5
|
|
6
6
|
#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`. Dkron 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. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
|
7
7
|
|
8
|
-
OpenAPI spec version: 0.
|
8
|
+
OpenAPI spec version: 0.10.0
|
9
9
|
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
-
|
12
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
13
|
-
you may not use this file except in compliance with the License.
|
14
|
-
You may obtain a copy of the License at
|
15
|
-
|
16
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
17
|
-
|
18
|
-
Unless required by applicable law or agreed to in writing, software
|
19
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
-
See the License for the specific language governing permissions and
|
22
|
-
limitations under the License.
|
11
|
+
Swagger Codegen version: 2.3.1
|
23
12
|
|
24
13
|
=end
|
25
14
|
|
@@ -35,18 +24,20 @@ Gem::Specification.new do |s|
|
|
35
24
|
s.homepage = "https://github.com/swagger-api/swagger-codegen"
|
36
25
|
s.summary = "Dkron REST API Ruby Gem"
|
37
26
|
s.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`. Dkron 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. Default API responses are unformatted JSON add the `pretty=true` param to format the response. "
|
38
|
-
|
27
|
+
# TODO uncommnet and update below with a proper license
|
28
|
+
#s.license = "Apache 2.0"
|
29
|
+
s.required_ruby_version = ">= 1.9"
|
39
30
|
|
40
31
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
41
|
-
s.add_runtime_dependency 'json', '~> 1
|
32
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
42
33
|
|
43
|
-
s.add_development_dependency 'rspec', '~> 3.
|
34
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
44
35
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
45
36
|
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
46
37
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
47
38
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
48
39
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
49
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.
|
40
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
50
41
|
|
51
42
|
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
52
43
|
s.test_files = `find spec/*`.split("\n")
|
data/docs/DefaultApi.md
CHANGED
data/docs/ExecutionsApi.md
CHANGED
@@ -4,7 +4,7 @@ All URIs are relative to *http://localhost:8080/v1*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**list_executions_by_job**](ExecutionsApi.md#list_executions_by_job) | **GET** /
|
7
|
+
[**list_executions_by_job**](ExecutionsApi.md#list_executions_by_job) | **GET** /jobs/{job_name}/executions |
|
8
8
|
|
9
9
|
|
10
10
|
# **list_executions_by_job**
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Dkron::ExecutorShell
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**command** | **String** | Command to run | [optional]
|
7
|
+
**env** | **String** | Comma separated environment variables pair | [optional]
|
8
|
+
**shell** | **BOOLEAN** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/Job.md
CHANGED
@@ -5,8 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**name** | **String** | Name for the job. |
|
7
7
|
**schedule** | **String** | Cron expression for the job. |
|
8
|
-
**
|
9
|
-
**shell** | **BOOLEAN** | Use shell to run the command | [optional]
|
8
|
+
**timezone** | **String** | Timezone where the job will be executed. By default and when field is set to empty string, the job will run in local time. | [optional]
|
10
9
|
**owner** | **String** | Owner of the job | [optional]
|
11
10
|
**owner_email** | **String** | Email of the owner | [optional]
|
12
11
|
**success_count** | **Integer** | Number of successful executions | [optional]
|
@@ -17,8 +16,10 @@ Name | Type | Description | Notes
|
|
17
16
|
**tags** | **Hash<String, String>** | Target nodes tags of this job | [optional]
|
18
17
|
**retries** | **Integer** | Number of times to retry a failed job execution | [optional]
|
19
18
|
**parent_job** | **String** | The name/id of the job that will trigger the execution of this job | [optional]
|
20
|
-
**dependent_jobs** |
|
21
|
-
**processors** | **
|
19
|
+
**dependent_jobs** | **Array<String>** | Array containing the jobs that depends on this one | [optional]
|
20
|
+
**processors** | [**Processors**](Processors.md) | | [optional]
|
22
21
|
**concurrency** | **String** | Concurrency policy for the job allow/forbid | [optional]
|
22
|
+
**executor** | **String** | Executor plugin used to run the job | [optional]
|
23
|
+
**executor_config** | [**ExecutorConfig**](ExecutorConfig.md) | | [optional]
|
23
24
|
|
24
25
|
|
data/docs/Member.md
CHANGED
@@ -9,10 +9,10 @@ Name | Type | Description | Notes
|
|
9
9
|
**tags** | **Hash<String, String>** | Tags asociated with this node | [optional]
|
10
10
|
**status** | **Integer** | The serf status of the node see: https://godoc.org/github.com/hashicorp/serf/serf#MemberStatus | [optional]
|
11
11
|
**protocol_min** | **Integer** | Serf protocol minimum version this node can understand or speak | [optional]
|
12
|
-
**protocol_max** | **Integer** |
|
12
|
+
**protocol_max** | **Integer** | Serf protocol maximum version this node can understand or speak | [optional]
|
13
13
|
**protocol_cur** | **Integer** | Serf protocol current version this node can understand or speak | [optional]
|
14
14
|
**delegate_min** | **Integer** | Serf delegate protocol minimum version this node can understand or speak | [optional]
|
15
|
-
**delegate_max** | **Integer** | Serf delegate protocol
|
16
|
-
**delegate_cur** | **Integer** | Serf delegate protocol
|
15
|
+
**delegate_max** | **Integer** | Serf delegate protocol maximum version this node can understand or speak | [optional]
|
16
|
+
**delegate_cur** | **Integer** | Serf delegate protocol current version this node can understand or speak | [optional]
|
17
17
|
|
18
18
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Dkron::ProcessorFiles
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**forward** | **BOOLEAN** | Forward the output to the next processor | [optional]
|
7
|
+
**log_dir** | **String** | | [optional]
|
8
|
+
|
9
|
+
|
data/docs/Processors.md
ADDED
data/git_push.sh
CHANGED
@@ -2,18 +2,6 @@
|
|
2
2
|
#
|
3
3
|
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
4
|
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
#
|
17
5
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
18
6
|
#
|
19
7
|
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
@@ -51,7 +39,7 @@ git_remote=`git remote`
|
|
51
39
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
52
40
|
|
53
41
|
if [ "$GIT_TOKEN" = "" ]; then
|
54
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
55
43
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
56
44
|
else
|
57
45
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
data/lib/dkron-rb.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
|
-
Dkron REST API
|
2
|
+
#Dkron REST API
|
3
3
|
|
4
|
-
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
|
4
|
+
#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`. Dkron 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. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.
|
6
|
+
OpenAPI spec version: 0.10.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,8 +18,14 @@ require 'dkron-rb/configuration'
|
|
18
18
|
|
19
19
|
# Models
|
20
20
|
require 'dkron-rb/models/execution'
|
21
|
+
require 'dkron-rb/models/executor_config'
|
22
|
+
require 'dkron-rb/models/executor_shell'
|
21
23
|
require 'dkron-rb/models/job'
|
22
24
|
require 'dkron-rb/models/member'
|
25
|
+
require 'dkron-rb/models/processor_files'
|
26
|
+
require 'dkron-rb/models/processor_log'
|
27
|
+
require 'dkron-rb/models/processor_syslog'
|
28
|
+
require 'dkron-rb/models/processors'
|
23
29
|
require 'dkron-rb/models/status'
|
24
30
|
|
25
31
|
# APIs
|
@@ -3,21 +3,10 @@
|
|
3
3
|
|
4
4
|
#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`. Dkron 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. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.
|
6
|
+
OpenAPI spec version: 0.10.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
9
|
+
Swagger Codegen version: 2.3.1
|
21
10
|
|
22
11
|
=end
|
23
12
|
|
@@ -32,7 +21,7 @@ module Dkron
|
|
32
21
|
end
|
33
22
|
|
34
23
|
#
|
35
|
-
# List
|
24
|
+
# List leader of cluster.
|
36
25
|
# @param [Hash] opts the optional parameters
|
37
26
|
# @return [Member]
|
38
27
|
def get_leader(opts = {})
|
@@ -41,7 +30,7 @@ module Dkron
|
|
41
30
|
end
|
42
31
|
|
43
32
|
#
|
44
|
-
# List
|
33
|
+
# List leader of cluster.
|
45
34
|
# @param [Hash] opts the optional parameters
|
46
35
|
# @return [Array<(Member, Fixnum, Hash)>] Member data, response status code and response headers
|
47
36
|
def get_leader_with_http_info(opts = {})
|
@@ -49,21 +38,17 @@ module Dkron
|
|
49
38
|
@api_client.config.logger.debug "Calling API: DefaultApi.get_leader ..."
|
50
39
|
end
|
51
40
|
# resource path
|
52
|
-
local_var_path = "/leader"
|
41
|
+
local_var_path = "/leader"
|
53
42
|
|
54
43
|
# query parameters
|
55
44
|
query_params = {}
|
56
45
|
|
57
46
|
# header parameters
|
58
47
|
header_params = {}
|
59
|
-
|
60
48
|
# HTTP header 'Accept' (if needed)
|
61
|
-
|
62
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
63
|
-
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
64
50
|
# HTTP header 'Content-Type'
|
65
|
-
|
66
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
51
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
67
52
|
|
68
53
|
# form parameters
|
69
54
|
form_params = {}
|
@@ -102,21 +87,17 @@ module Dkron
|
|
102
87
|
@api_client.config.logger.debug "Calling API: DefaultApi.leave ..."
|
103
88
|
end
|
104
89
|
# resource path
|
105
|
-
local_var_path = "/leave"
|
90
|
+
local_var_path = "/leave"
|
106
91
|
|
107
92
|
# query parameters
|
108
93
|
query_params = {}
|
109
94
|
|
110
95
|
# header parameters
|
111
96
|
header_params = {}
|
112
|
-
|
113
97
|
# HTTP header 'Accept' (if needed)
|
114
|
-
|
115
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
116
|
-
|
98
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
99
|
# HTTP header 'Content-Type'
|
118
|
-
|
119
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
100
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
120
101
|
|
121
102
|
# form parameters
|
122
103
|
form_params = {}
|
@@ -155,21 +136,17 @@ module Dkron
|
|
155
136
|
@api_client.config.logger.debug "Calling API: DefaultApi.status ..."
|
156
137
|
end
|
157
138
|
# resource path
|
158
|
-
local_var_path = "/"
|
139
|
+
local_var_path = "/"
|
159
140
|
|
160
141
|
# query parameters
|
161
142
|
query_params = {}
|
162
143
|
|
163
144
|
# header parameters
|
164
145
|
header_params = {}
|
165
|
-
|
166
146
|
# HTTP header 'Accept' (if needed)
|
167
|
-
|
168
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
169
|
-
|
147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
170
148
|
# HTTP header 'Content-Type'
|
171
|
-
|
172
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
149
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
173
150
|
|
174
151
|
# form parameters
|
175
152
|
form_params = {}
|