aggkit 0.4.7.15744 → 0.4.7.15796

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/bin/aggwrap +0 -49
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f309b03a6daed54f63851a0928635dda2ac76c7f87b40e3e756ce53fcc1c015
4
- data.tar.gz: 577d57616c73ec77507fc06637fbc66d87c8d19e598f33feecf995159e32e654
3
+ metadata.gz: 0acae442c0ca4a77a7635f596d77d2fb711b21be77df2add4cbb34dbde9770c5
4
+ data.tar.gz: 751ad965fb388ab5cfbd9d3bec3366f56bbb8175c205d08252c2e5837493a602
5
5
  SHA512:
6
- metadata.gz: 38760267a8c1c9c933759aa7bce17999969c0b0d574dce22b93a377ea8b2b4c768c62dad4c51a5299ef247313e97373595f27bafe6e25a5f9be73cb8b4454d0d
7
- data.tar.gz: aef48d321d30ccc445705c16fdb6b3769117deff62c80c433a6e28b4fa446fa50791d52dce8998ae9f0064f6ba0ae3f090127c67168357dc62f0f40c6c514a9f
6
+ metadata.gz: 72c001cbfa757d2d5921f902cc585941bdc9cb34f603b5333a90680fb13bf1a1127768f47d41db61b6890db1cf5189ffb81fa1782ac826c0280fa2341160f02d
7
+ data.tar.gz: 1cc07622088e181c437fe72be20c9657ffbd02ab87aa627dcb356e691f14a7fe7bb8ed0bec5c626b317dd80b2ef8fbdb4a4fb0a4d0a9f14349a405d0377a54a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aggkit (0.4.7.15744)
4
+ aggkit (0.4.7.15796)
5
5
  diplomat
6
6
  dotenv
7
7
  json
data/bin/aggwrap CHANGED
@@ -7,61 +7,12 @@ require 'net/http'
7
7
  require 'uri'
8
8
  require 'socket'
9
9
 
10
- module Diplomat
11
-
12
- # Methods for interacting with the Consul check API endpoint
13
- class Check < Diplomat::RestClient
14
-
15
- # Update a TTL check
16
- # @param check_id [String] the unique id of the check
17
- # @param status [String] status of the check. Valid values are "passing", "warning", and "critical"
18
- # @param output [String] human-readable message will be passed through to the check's Output field
19
- # @return [Integer] Status code
20
- def update_ttl(check_id, status, output = nil)
21
- ret = @conn.put do |req|
22
- req.url "/v1/agent/check/update/#{check_id}"
23
- req.body = JSON.generate('Status' => status, 'Output' => output)
24
- end
25
- ret.status == 200
26
- end
27
-
28
- # Pass a check
29
- # @param check_id [String] the unique id of the check
30
- # @param output [String] human-readable message will be passed through to the check's Output field
31
- # @return [Integer] Status code
32
- def pass(check_id, output = nil)
33
- update_ttl(check_id, 'passing', output)
34
- end
35
-
36
- # Warn a check
37
- # @param check_id [String] the unique id of the check
38
- # @param output [String] human-readable message will be passed through to the check's Output field
39
- # @return [Integer] Status code
40
- def warn(check_id, output = nil)
41
- update_ttl(check_id, 'warning', output)
42
- end
43
-
44
- # Fail a check
45
- # @param check_id [String] the unique id of the check
46
- # @param output [String] human-readable message will be passed through to the check's Output field
47
- # @return [Integer] Status code
48
- def fail(check_id, output = nil)
49
- update_ttl(check_id, 'critical', output)
50
- end
51
-
52
- end
53
-
54
- end
55
-
56
-
57
-
58
10
  STDERR.sync
59
11
  STDOUT.sync
60
12
 
61
13
  UTIL = File.basename(__FILE__)
62
14
  DEFAULT_RELOAD_INTERVAL = 60 # seconds
63
15
 
64
-
65
16
  include Aggkit::Runner
66
17
 
67
18
  consul_addr = Aggkit::Consul.build_consul_addr(addr: ENV['CONSUL_HTTP_ADDR'], host: ENV['CONSUL_HOST'], port: ENV['CONSUL_PORT'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aggkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7.15744
4
+ version: 0.4.7.15796
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-09-05 00:00:00.000000000 Z
12
+ date: 2019-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diplomat