fluent-plugin-syslog-gobi-tls 2.1.29 → 2.1.30

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cd2b97fbf5538d79f925edfa2231254929ad80295ef137ddd1f6f18dc38ebd7
4
- data.tar.gz: 708b7e494707863e469776e94c942f81d556c2b6ccdb84c7d5d24ee244ce8eb6
3
+ metadata.gz: 79ff3a260ddc3cfea4990af9d84b44884ab3f0104e01c7e697bd17d5acc1b024
4
+ data.tar.gz: 33fee4ba277d9db09fd18d42479af95ac1882fbad918a8823992bb3e302cb22c
5
5
  SHA512:
6
- metadata.gz: a2b97e8aad0a0414ea98e9c31d2e59fa767333f3b15133fcbf702304e80bef1982745ddea8f7a191ab7f32fc29c437f8da679c1188f1285c95b533e4b12cfbd7
7
- data.tar.gz: fb54c28711b00c1bdf00ef0e38f7c4609e4f7091ae87d8243e11bdf326b59de4d3aca0c6acab5384539e15c7fa4a17ae6cbdab78863d7c2d0143a6dedbf42ca3
6
+ metadata.gz: 9a4ef8654a33593e90536aeb2a4694b6f199827b1b3437ad0190de72b6df3ec97ce5923aae18034d38362640aa4a8047d128cf681c67ac7591bc50a998403121
7
+ data.tar.gz: 8101fa0ee62becadfe46960a41cae3d4c0ffda769b3033cb9adf98a613de7214c59c4c154d15ee8dbfff644d8102480e19ee63344cee45c08417080ef58bf9cd
@@ -19,7 +19,7 @@ require 'syslog_tls/version'
19
19
 
20
20
  Gem::Specification.new do |s|
21
21
  s.name = 'fluent-plugin-syslog-gobi-tls'
22
- s.version = '2.1.29'
22
+ s.version = '2.1.30'
23
23
  s.authors = ['thomas morgan']
24
24
  s.email = ['tm@iprog.com']
25
25
  s.summary = %q{Fluent Syslog TLS output plugin}
@@ -0,0 +1,40 @@
1
+ require 'pp'
2
+
3
+ module SyslogTls
4
+ class HostBackoffSpecs
5
+ attr_accessor :retriesToDo, :hostIPport
6
+
7
+ def initialize(retries_to_do, host_ip_port)
8
+ @retriesToDo = retries_to_do
9
+ @hostIPport = host_ip_port
10
+ @failTime = nil
11
+ @baseThreshold = 2
12
+ end
13
+
14
+ def canwrite
15
+ time_passed_since_failure = -1
16
+ if @failTime != nil
17
+ time_passed_since_failure = Time.now - @failTime
18
+ time_passed_since_failure = time_passed_since_failure.round(2)
19
+ end
20
+ if time_passed_since_failure == -1
21
+ return 1
22
+ end
23
+ if time_passed_since_failure > @baseThreshold ** @retriesToDo
24
+ return 1
25
+ else
26
+ return 0
27
+ end
28
+ end
29
+
30
+ def failtowrite
31
+ @retriesToDo += 1
32
+ @failTime = Time.now
33
+ end
34
+
35
+ def resetRetries
36
+ @retriesToDo = 0
37
+ @failTime = nil
38
+ end
39
+ end
40
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-syslog-gobi-tls
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.29
4
+ version: 2.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
@@ -134,6 +134,7 @@ files:
134
134
  - fluent-plugin-syslog-tls.gemspec
135
135
  - lib/fluent/plugin/out_syslog_tls.rb
136
136
  - lib/syslog_tls/facility.rb
137
+ - lib/syslog_tls/host_backoff_specs.rb
137
138
  - lib/syslog_tls/logger.rb
138
139
  - lib/syslog_tls/lookup_from_const.rb
139
140
  - lib/syslog_tls/protocol.rb