aggkit 0.4.9.19910 → 0.4.91.19914

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b657b5dea23eb5fbff2e12ee3b2cc60b6b38fd08c8dacd0228617f686e43ed32
4
- data.tar.gz: 372f667ba11d9eca4a6f99384d740a8d873e5d2b9a50929387dffe803a1f599d
3
+ metadata.gz: '0911be0b1d65fa6d2377a38b5f63268246242bc84f2d7ffe7612df5f695fea68'
4
+ data.tar.gz: 2e913e29c41d8c50076fcc801f25b81357175a7bca9af03fe52f45edace37035
5
5
  SHA512:
6
- metadata.gz: 445208a0a5b4f92701cbca89ce00d34be699abf292fe76242ec4039297d73841585c9eb4085d91c943af501a61e52f00f5758eb3b23e69beb3586e11f59f4a1e
7
- data.tar.gz: b1489233760caea865521f3af563a5201461cf5b6c67fa164ddd6f77bd04589f6d43a21758b49215d686c74d5329a8f78ef646d10986d33a84b2d56d8f4bc8ee
6
+ metadata.gz: 2be8badd002d97de3b5f44e4a3a393e3442a2260c250421bfcbcfc47b5416e4bc824afc7e19df2c94207c3d8a167911f24c3256bd422685532c06cec97fd0f6b
7
+ data.tar.gz: 966330975a4f84dd82009bc5e459454b06bdf184317afbcf906eaf21c74061c05fc334c516ccaec3786fcce2ec0a9da20d83c02a1f8b2fdbcfdbc4d6d380333a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aggkit (0.4.9.19910)
4
+ aggkit (0.4.91.19914)
5
5
  diplomat
6
6
  dotenv
7
7
  json
data/bin/aggwrap CHANGED
@@ -17,14 +17,9 @@ include Aggkit::Runner
17
17
 
18
18
  consul_addr = Aggkit::Consul.build_consul_addr(addr: ENV['CONSUL_HTTP_ADDR'], host: ENV['CONSUL_HOST'], port: ENV['CONSUL_PORT'])
19
19
 
20
- service = if ENV['AGGREDATOR_COMPONENT'].to_s == ''
21
- ENV['AGGREDATOR_SERVICE']
22
- else
23
- "#{ENV['AGGREDATOR_SERVICE']}-#{ENV['AGGREDATOR_COMPONENT']}"
24
- end
25
-
26
20
  @opts = {
27
- service: service,
21
+ service: ENV['AGGREDATOR_SERVICE'],
22
+ component: ENV.fetch("AGGREDATOR_COMPONENT", 'service').strip,
28
23
  id: Socket.gethostname,
29
24
  reload_interval: DEFAULT_RELOAD_INTERVAL,
30
25
  tags: []
@@ -44,7 +39,7 @@ end
44
39
  parser = Aggkit::OptionParser.new do |o|
45
40
  o.banner = "Usage: #{UTIL} [options] -- exec script"
46
41
 
47
- o.on('--service <NAME>', 'Set service NAME. $AGGREDATOR_SERVICE-$AGGREDATOR_COMPONENT env used when missed') do |service|
42
+ o.on('--service <NAME>', 'Set service NAME. AGGREDATOR_SERVICE env used when missed') do |service|
48
43
  @opts[:service] = service.to_s
49
44
  end
50
45
 
@@ -108,7 +103,8 @@ die 'service name must be provided' if @opts[:service].to_s.empty?
108
103
 
109
104
  die 'script must be provided' if @opts[:exec].empty?
110
105
 
111
- @opts[:tags] << "service-#{@opts[:service]}"
106
+ @opts[:tags] += [@opts[:service], @opts[:component]]
107
+ @opts[:tags] = @opts[:tags].flatten.compact.sort.uniq
112
108
 
113
109
  Diplomat.configure do |config|
114
110
  config.url = @opts[:consul]
@@ -120,9 +116,13 @@ SERVICE_ID = "#{@opts[:service]}_#{@opts[:id]}".freeze
120
116
  Name: @opts[:service],
121
117
  ID: SERVICE_ID,
122
118
  Checks: [],
123
- Tags: @opts[:tags]
119
+ Tags: @opts[:tags],
120
+ Meta: {
121
+ component: @opts[:component]
122
+ }
124
123
  }
125
124
 
125
+
126
126
  @checks = {}
127
127
 
128
128
 
@@ -1,6 +1,6 @@
1
1
  module Aggkit
2
2
 
3
- VERSION = '0.4.9'.freeze
3
+ VERSION = '0.4.91'.freeze
4
4
 
5
5
  end
6
6
 
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.9.19910
4
+ version: 0.4.91.19914
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan