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 +4 -4
- data/Gemfile.lock +1 -1
- data/bin/aggwrap +10 -10
- data/lib/aggkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0911be0b1d65fa6d2377a38b5f63268246242bc84f2d7ffe7612df5f695fea68'
|
4
|
+
data.tar.gz: 2e913e29c41d8c50076fcc801f25b81357175a7bca9af03fe52f45edace37035
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2be8badd002d97de3b5f44e4a3a393e3442a2260c250421bfcbcfc47b5416e4bc824afc7e19df2c94207c3d8a167911f24c3256bd422685532c06cec97fd0f6b
|
7
|
+
data.tar.gz: 966330975a4f84dd82009bc5e459454b06bdf184317afbcf906eaf21c74061c05fc334c516ccaec3786fcce2ec0a9da20d83c02a1f8b2fdbcfdbc4d6d380333a
|
data/Gemfile.lock
CHANGED
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:
|
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.
|
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]
|
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
|
|
data/lib/aggkit/version.rb
CHANGED