fluent-plugin-http_shadow 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-http_shadow.gemspec +1 -1
- data/lib/fluent/plugin/out_http_shadow.rb +4 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34238489c71180d94274b3353a9c3d3a5c9ba08a
|
4
|
+
data.tar.gz: 5a6998468971973816f628e73461b12ccf1fc86f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f04ed87c84350420e85d7d5ede9fe2498c4c1bf038d5397b4f83c16a8217a8a946b034ee649864b05d00b90d3b0cea2386ebe9fb869cec1ab772929cf10525
|
7
|
+
data.tar.gz: eb6ec452941687f0863df90ff87f56ba58c2a7e6d1969af1239e132c4af0b39bc6a134d7c9df98cb4e86e56a587891348ef0e81bc7f0a20b2a52395adf20376d
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-http_shadow"
|
5
|
-
gem.version = "0.0.
|
5
|
+
gem.version = "0.0.3"
|
6
6
|
gem.summary = %q{copy http request. use shadow proxy server.}
|
7
7
|
gem.description = %q{copy http request. use shadow proxy server.}
|
8
8
|
gem.license = "MIT"
|
@@ -22,6 +22,7 @@ module Fluent
|
|
22
22
|
config_param :timeout, :integer, :default => 5
|
23
23
|
config_param :username, :string, :default => nil
|
24
24
|
config_param :password, :string, :default => nil
|
25
|
+
config_param :rate, :integer, :default => 100
|
25
26
|
|
26
27
|
def configure(conf)
|
27
28
|
super
|
@@ -49,7 +50,8 @@ module Fluent
|
|
49
50
|
chunk.msgpack_each do |tag, time, record|
|
50
51
|
records << record
|
51
52
|
end
|
52
|
-
|
53
|
+
sampling_size = (records.size * (@rate * 0.01)).to_i
|
54
|
+
send_request_parallel(records.sample(sampling_size))
|
53
55
|
end
|
54
56
|
|
55
57
|
private
|
@@ -74,7 +76,7 @@ module Fluent
|
|
74
76
|
params.merge(record[@params_key]) unless record[@params_key].nil?
|
75
77
|
|
76
78
|
option = {
|
77
|
-
timeout: @timeout
|
79
|
+
timeout: @timeout,
|
78
80
|
followlocation: true,
|
79
81
|
method: method,
|
80
82
|
params: params,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-http_shadow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Toyama
|
@@ -174,11 +174,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.4.
|
177
|
+
rubygems_version: 2.4.5
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: copy http request. use shadow proxy server.
|
181
181
|
test_files:
|
182
182
|
- test/helper.rb
|
183
183
|
- test/plugin/test_out_http_shadow.rb
|
184
|
-
has_rdoc:
|