fluentd 1.17.1-x64-mingw-ucrt → 1.19.0-x64-mingw-ucrt

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +116 -0
  3. data/CHANGELOG.md +293 -16
  4. data/MAINTAINERS.md +8 -2
  5. data/README.md +3 -7
  6. data/Rakefile +2 -0
  7. data/SECURITY.md +5 -3
  8. data/lib/fluent/command/cap_ctl.rb +2 -2
  9. data/lib/fluent/command/fluentd.rb +13 -3
  10. data/lib/fluent/compat/formatter.rb +6 -0
  11. data/lib/fluent/compat/socket_util.rb +2 -2
  12. data/lib/fluent/config/configure_proxy.rb +1 -1
  13. data/lib/fluent/config/element.rb +2 -2
  14. data/lib/fluent/config/literal_parser.rb +12 -5
  15. data/lib/fluent/config/parser.rb +15 -3
  16. data/lib/fluent/config/section.rb +2 -2
  17. data/lib/fluent/config/types.rb +1 -1
  18. data/lib/fluent/config/v1_parser.rb +3 -3
  19. data/lib/fluent/counter/store.rb +1 -1
  20. data/lib/fluent/engine.rb +50 -34
  21. data/lib/fluent/env.rb +6 -2
  22. data/lib/fluent/event.rb +7 -6
  23. data/lib/fluent/event_router.rb +2 -2
  24. data/lib/fluent/log/console_adapter.rb +5 -7
  25. data/lib/fluent/log.rb +23 -0
  26. data/lib/fluent/plugin/bare_output.rb +0 -16
  27. data/lib/fluent/plugin/base.rb +2 -2
  28. data/lib/fluent/plugin/buf_file.rb +15 -1
  29. data/lib/fluent/plugin/buf_file_single.rb +15 -1
  30. data/lib/fluent/plugin/buffer/chunk.rb +74 -10
  31. data/lib/fluent/plugin/buffer/file_chunk.rb +9 -5
  32. data/lib/fluent/plugin/buffer/file_single_chunk.rb +3 -3
  33. data/lib/fluent/plugin/buffer/memory_chunk.rb +2 -2
  34. data/lib/fluent/plugin/buffer.rb +34 -6
  35. data/lib/fluent/plugin/compressable.rb +68 -22
  36. data/lib/fluent/plugin/filter.rb +0 -8
  37. data/lib/fluent/plugin/filter_parser.rb +27 -51
  38. data/lib/fluent/plugin/filter_record_transformer.rb +1 -1
  39. data/lib/fluent/plugin/formatter_csv.rb +18 -4
  40. data/lib/fluent/plugin/formatter_json.rb +7 -4
  41. data/lib/fluent/plugin/formatter_out_file.rb +5 -2
  42. data/lib/fluent/plugin/in_forward.rb +9 -5
  43. data/lib/fluent/plugin/in_http.rb +14 -4
  44. data/lib/fluent/plugin/in_monitor_agent.rb +4 -8
  45. data/lib/fluent/plugin/in_syslog.rb +4 -0
  46. data/lib/fluent/plugin/in_tail/position_file.rb +1 -1
  47. data/lib/fluent/plugin/in_tail.rb +80 -57
  48. data/lib/fluent/plugin/in_tcp.rb +6 -2
  49. data/lib/fluent/plugin/in_udp.rb +11 -2
  50. data/lib/fluent/plugin/input.rb +4 -8
  51. data/lib/fluent/plugin/multi_output.rb +1 -17
  52. data/lib/fluent/plugin/out_buffer.rb +40 -0
  53. data/lib/fluent/plugin/out_exec_filter.rb +2 -2
  54. data/lib/fluent/plugin/out_file.rb +37 -30
  55. data/lib/fluent/plugin/out_forward/connection_manager.rb +2 -2
  56. data/lib/fluent/plugin/out_forward.rb +23 -13
  57. data/lib/fluent/plugin/out_http.rb +1 -1
  58. data/lib/fluent/plugin/out_secondary_file.rb +2 -2
  59. data/lib/fluent/plugin/out_stdout.rb +10 -3
  60. data/lib/fluent/plugin/out_stream.rb +3 -3
  61. data/lib/fluent/plugin/output.rb +26 -35
  62. data/lib/fluent/plugin/owned_by_mixin.rb +2 -2
  63. data/lib/fluent/plugin/parser.rb +3 -3
  64. data/lib/fluent/plugin/parser_json.rb +3 -3
  65. data/lib/fluent/plugin/sd_file.rb +2 -2
  66. data/lib/fluent/plugin/storage_local.rb +8 -4
  67. data/lib/fluent/plugin.rb +1 -1
  68. data/lib/fluent/plugin_helper/cert_option.rb +8 -0
  69. data/lib/fluent/plugin_helper/child_process.rb +2 -2
  70. data/lib/fluent/plugin_helper/event_emitter.rb +12 -0
  71. data/lib/fluent/plugin_helper/http_server/request.rb +13 -2
  72. data/lib/fluent/plugin_helper/http_server/server.rb +14 -8
  73. data/lib/fluent/plugin_helper/http_server.rb +1 -8
  74. data/lib/fluent/plugin_helper/metrics.rb +7 -0
  75. data/lib/fluent/plugin_helper/server.rb +13 -1
  76. data/lib/fluent/plugin_helper/service_discovery.rb +1 -1
  77. data/lib/fluent/plugin_helper/socket_option.rb +2 -2
  78. data/lib/fluent/plugin_helper/storage.rb +1 -1
  79. data/lib/fluent/plugin_id.rb +3 -3
  80. data/lib/fluent/root_agent.rb +117 -21
  81. data/lib/fluent/source_only_buffer_agent.rb +102 -0
  82. data/lib/fluent/static_config_analysis.rb +3 -2
  83. data/lib/fluent/supervisor.rb +258 -39
  84. data/lib/fluent/system_config.rb +27 -6
  85. data/lib/fluent/test/base.rb +1 -1
  86. data/lib/fluent/test/driver/base.rb +2 -2
  87. data/lib/fluent/test/filter_test.rb +2 -2
  88. data/lib/fluent/test/formatter_test.rb +1 -1
  89. data/lib/fluent/test/helpers.rb +4 -0
  90. data/lib/fluent/test/input_test.rb +2 -2
  91. data/lib/fluent/test/output_test.rb +4 -4
  92. data/lib/fluent/test/parser_test.rb +1 -1
  93. data/lib/fluent/tls.rb +24 -0
  94. data/lib/fluent/variable_store.rb +1 -1
  95. data/lib/fluent/version.rb +1 -1
  96. data/lib/fluent/winsvc.rb +38 -8
  97. metadata +99 -28
  98. data/lib/fluent/plugin_helper/http_server/compat/server.rb +0 -92
  99. data/lib/fluent/plugin_helper/http_server/compat/ssl_context_extractor.rb +0 -52
  100. data/lib/fluent/plugin_helper/http_server/compat/webrick_handler.rb +0 -58
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'fluent/configurable'
18
18
  require 'fluent/config/element'
19
+ require 'fluent/env'
19
20
 
20
21
  module Fluent
21
22
  class SystemConfig
@@ -25,10 +26,11 @@ module Fluent
25
26
  :workers, :restart_worker_interval, :root_dir, :log_level,
26
27
  :suppress_repeated_stacktrace, :emit_error_log_interval, :suppress_config_dump,
27
28
  :log_event_verbose, :ignore_repeated_log_interval, :ignore_same_log_interval,
28
- :without_source, :rpc_endpoint, :enable_get_dump, :process_name,
29
+ :without_source, :with_source_only, :rpc_endpoint, :enable_get_dump, :process_name,
29
30
  :file_permission, :dir_permission, :counter_server, :counter_client,
30
31
  :strict_config_value, :enable_msgpack_time_support, :disable_shared_socket,
31
- :metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit
32
+ :metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit, :source_only_buffer,
33
+ :config_include_dir
32
34
  ]
33
35
 
34
36
  config_param :workers, :integer, default: 1
@@ -41,14 +43,15 @@ module Fluent
41
43
  config_param :emit_error_log_interval, :time, default: nil
42
44
  config_param :suppress_config_dump, :bool, default: nil
43
45
  config_param :log_event_verbose, :bool, default: nil
44
- config_param :without_source, :bool, default: nil
46
+ config_param :without_source, :bool, default: nil
47
+ config_param :with_source_only, :bool, default: nil
45
48
  config_param :rpc_endpoint, :string, default: nil
46
49
  config_param :enable_get_dump, :bool, default: nil
47
50
  config_param :process_name, :string, default: nil
48
51
  config_param :strict_config_value, :bool, default: nil
49
52
  config_param :enable_msgpack_time_support, :bool, default: nil
50
53
  config_param :disable_shared_socket, :bool, default: nil
51
- config_param :enable_input_metrics, :bool, default: nil
54
+ config_param :enable_input_metrics, :bool, default: true
52
55
  config_param :enable_size_metrics, :bool, default: nil
53
56
  config_param :enable_jit, :bool, default: false
54
57
  config_param :file_permission, default: nil do |v|
@@ -57,7 +60,9 @@ module Fluent
57
60
  config_param :dir_permission, default: nil do |v|
58
61
  v.to_i(8)
59
62
  end
63
+ config_param :config_include_dir, default: Fluent::DEFAULT_CONFIG_INCLUDE_DIR
60
64
  config_section :log, required: false, init: true, multi: false do
65
+ config_param :path, :string, default: nil
61
66
  config_param :format, :enum, list: [:text, :json], default: :text
62
67
  config_param :time_format, :string, default: '%Y-%m-%d %H:%M:%S %z'
63
68
  config_param :rotate_age, default: nil do |v|
@@ -74,6 +79,7 @@ module Fluent
74
79
  end
75
80
  end
76
81
  config_param :rotate_size, :size, default: nil
82
+ config_param :forced_stacktrace_level, :enum, list: [:none, :trace, :debug, :info, :warn, :error, :fatal], default: :none
77
83
  end
78
84
 
79
85
  config_section :counter_server, multi: false do
@@ -103,6 +109,20 @@ module Fluent
103
109
  config_param :labels, :hash, default: {}
104
110
  end
105
111
 
112
+ config_section :source_only_buffer, init: true, multi: false do
113
+ config_param :flush_thread_count, :integer, default: 1
114
+ config_param :overflow_action, :enum, list: [:throw_exception, :block, :drop_oldest_chunk], default: :drop_oldest_chunk
115
+ config_param :path, :string, default: nil
116
+ config_param :flush_interval, :time, default: nil
117
+ config_param :chunk_limit_size, :size, default: nil
118
+ config_param :total_limit_size, :size, default: nil
119
+ config_param :compress, :enum, list: [:text, :gzip], default: nil
120
+ end
121
+
122
+ def force_stacktrace_level?
123
+ @log.forced_stacktrace_level != :none
124
+ end
125
+
106
126
  def self.create(conf, strict_config_value=false)
107
127
  systems = conf.elements(name: 'system')
108
128
  return SystemConfig.new if systems.empty?
@@ -147,6 +167,7 @@ module Fluent
147
167
  end
148
168
 
149
169
  @log_level = Log.str_to_level(@log_level.to_s) if @log_level
170
+ @log[:forced_stacktrace_level] = Log.str_to_level(@log.forced_stacktrace_level.to_s) if force_stacktrace_level?
150
171
  end
151
172
 
152
173
  def dup
@@ -171,13 +192,13 @@ module Fluent
171
192
  unless defined?($_system_config)
172
193
  $_system_config = nil
173
194
  end
174
- (instance_variable_defined?("@_system_config") && @_system_config) ||
195
+ (instance_variable_defined?(:@_system_config) && @_system_config) ||
175
196
  $_system_config || Fluent::Engine.system_config
176
197
  end
177
198
 
178
199
  def system_config_override(opts={})
179
200
  require 'fluent/engine'
180
- if !instance_variable_defined?("@_system_config") || @_system_config.nil?
201
+ if !instance_variable_defined?(:@_system_config) || @_system_config.nil?
181
202
  @_system_config = (defined?($_system_config) && $_system_config ? $_system_config : Fluent::Engine.system_config).dup
182
203
  end
183
204
  opts.each_pair do |key, value|
@@ -32,7 +32,7 @@ module Fluent
32
32
  # klass.dup is worse because its ancestors does NOT include original class name
33
33
  klass_name = klass.name
34
34
  klass = Class.new(klass)
35
- klass.define_singleton_method("name") { klass_name }
35
+ klass.define_singleton_method(:name) { klass_name }
36
36
  klass.module_eval(&block)
37
37
  end
38
38
  @instance = klass.new
@@ -185,7 +185,7 @@ module Fluent
185
185
  end
186
186
  end
187
187
 
188
- def run_actual(timeout: DEFAULT_TIMEOUT, &block)
188
+ def run_actual(timeout: DEFAULT_TIMEOUT)
189
189
  if @instance.respond_to?(:_threads)
190
190
  sleep 0.1 until @instance._threads.values.all?(&:alive?)
191
191
  end
@@ -201,7 +201,7 @@ module Fluent
201
201
  return_value = nil
202
202
  begin
203
203
  Timeout.timeout(timeout * 2) do |sec|
204
- return_value = block.call if block_given?
204
+ return_value = yield if block_given?
205
205
  end
206
206
  rescue Timeout::Error
207
207
  raise TestTimedOut, "Test case timed out with hard limit."
@@ -59,9 +59,9 @@ module Fluent
59
59
  alias_method :emits, :filtered_as_array # emits is for consistent with other drivers
60
60
 
61
61
  # Almost filters don't use threads so default is 0. It reduces test time.
62
- def run(num_waits = 0, &block)
62
+ def run(num_waits = 0)
63
63
  super(num_waits) {
64
- block.call if block
64
+ yield if block_given?
65
65
 
66
66
  @events.each { |tag, es|
67
67
  processed = @instance.filter_stream(tag, es)
@@ -28,7 +28,7 @@ module Fluent
28
28
  # klass.dup is worse because its ancestors does NOT include original class name
29
29
  klass_name = klass_or_str.name
30
30
  klass_or_str = Class.new(klass_or_str)
31
- klass_or_str.define_singleton_method("name") { klass_name }
31
+ klass_or_str.define_singleton_method(:name) { klass_name }
32
32
  klass_or_str.module_eval(&block)
33
33
  end
34
34
  @instance = klass_or_str.new
@@ -50,6 +50,10 @@ EOT
50
50
  end
51
51
  end
52
52
 
53
+ def event_time_without_nsec(str=nil, format: nil)
54
+ Fluent::EventTime.new(event_time(str, format: format))
55
+ end
56
+
53
57
  def with_timezone(tz)
54
58
  oldtz, ENV['TZ'] = ENV['TZ'], tz
55
59
  yield
@@ -109,7 +109,7 @@ module Fluent
109
109
  end
110
110
  end
111
111
 
112
- def run(num_waits = 10, &block)
112
+ def run(num_waits = 10)
113
113
  m = method(:emit_stream)
114
114
  unless Engine.singleton_class.ancestors.include?(EmitStreamWrapper)
115
115
  Engine.singleton_class.prepend EmitStreamWrapper
@@ -121,7 +121,7 @@ module Fluent
121
121
  instance.router.emit_stream_callee = m
122
122
 
123
123
  super(num_waits) {
124
- block.call if block
124
+ yield if block_given?
125
125
 
126
126
  if @expected_emits_length || @expects || @run_post_conditions
127
127
  # counters for emits and emit_streams
@@ -71,10 +71,10 @@ module Fluent
71
71
  (@expected_buffer ||= '') << str
72
72
  end
73
73
 
74
- def run(num_waits = 10, &block)
74
+ def run(num_waits = 10)
75
75
  result = nil
76
76
  super(num_waits) {
77
- block.call if block
77
+ yield if block_given?
78
78
 
79
79
  es = ArrayEventStream.new(@entries)
80
80
  buffer = @instance.format_stream(@tag, es)
@@ -119,10 +119,10 @@ module Fluent
119
119
  (@expected_buffer ||= '') << str
120
120
  end
121
121
 
122
- def run(&block)
122
+ def run
123
123
  result = []
124
124
  super {
125
- block.call if block
125
+ yield if block_given?
126
126
 
127
127
  buffer = ''
128
128
  lines = {}
@@ -27,7 +27,7 @@ module Fluent
27
27
  # klass.dup is worse because its ancestors does NOT include original class name
28
28
  klass_name = klass_or_str.name
29
29
  klass_or_str = Class.new(klass_or_str)
30
- klass_or_str.define_singleton_method("name") { klass_name }
30
+ klass_or_str.define_singleton_method(:name) { klass_name }
31
31
  klass_or_str.module_eval(&block)
32
32
  end
33
33
  case klass_or_str.instance_method(:initialize).arity
data/lib/fluent/tls.rb CHANGED
@@ -76,6 +76,30 @@ module Fluent
76
76
  ctx
77
77
  end
78
78
  module_function :set_version_to_context
79
+
80
+ def set_version_to_options(opt, version, min_version, max_version)
81
+ if MIN_MAX_AVAILABLE
82
+ case
83
+ when min_version.nil? && max_version.nil?
84
+ min_version = METHODS_MAP[version] || version
85
+ max_version = METHODS_MAP[version] || version
86
+ when min_version.nil? && max_version
87
+ raise Fluent::ConfigError, "When you set max_version, must set min_version together"
88
+ when min_version && max_version.nil?
89
+ raise Fluent::ConfigError, "When you set min_version, must set max_version together"
90
+ else
91
+ min_version = METHODS_MAP[min_version] || min_version
92
+ max_version = METHODS_MAP[max_version] || max_version
93
+ end
94
+ opt[:min_version] = min_version
95
+ opt[:max_version] = max_version
96
+ else
97
+ opt[:ssl_version] = METHODS_MAP[version] || version
98
+ end
99
+
100
+ opt
101
+ end
102
+ module_function :set_version_to_options
79
103
  end
80
104
  end
81
105
 
@@ -15,7 +15,7 @@
15
15
  #
16
16
 
17
17
  module Fluent
18
- # VariableStore provides all pluigns with the way to shared variable without using class variable
18
+ # VariableStore provides all plugins with the way to shared variable without using class variable
19
19
  # it's for safe reloading mechanism
20
20
  class VariableStore
21
21
  @data = {}
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.17.1'
19
+ VERSION = '1.19.0'
20
20
 
21
21
  end
data/lib/fluent/winsvc.rb CHANGED
@@ -32,7 +32,7 @@ begin
32
32
  op.parse(ARGV)
33
33
  if opts[:service_name] == nil
34
34
  raise "Error: No Windows Service name set. Use '--service-name'"
35
- end
35
+ end
36
36
 
37
37
  def read_fluentdopt(service_name)
38
38
  Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{service_name}") do |reg|
@@ -48,25 +48,32 @@ begin
48
48
  end
49
49
 
50
50
  class FluentdService < Daemon
51
+ ERROR_WAIT_NO_CHILDREN = 128
52
+
51
53
  @pid = 0
52
54
  @service_name = ''
53
55
 
54
56
  def initialize(service_name)
55
57
  @service_name = service_name
56
58
  end
57
-
59
+
58
60
  def service_main
59
61
  @pid = service_main_start(@service_name)
60
- while running?
61
- sleep 10
62
+ begin
63
+ loop do
64
+ sleep 5
65
+ break unless running?
66
+ raise Errno::ECHILD if Process.waitpid(@pid, Process::WNOHANG)
67
+ end
68
+ rescue Errno::ECHILD
69
+ @pid = 0
70
+ SetEvent(@@hStopEvent)
71
+ SetTheServiceStatus.call(SERVICE_STOPPED, ERROR_WAIT_NO_CHILDREN, 0, 0)
62
72
  end
63
73
  end
64
74
 
65
75
  def service_stop
66
- set_event(@service_name)
67
- if @pid > 0
68
- Process.waitpid(@pid)
69
- end
76
+ wait_supervisor_finished if @pid > 0
70
77
  end
71
78
 
72
79
  def service_paramchange
@@ -91,6 +98,29 @@ begin
91
98
  ev.set
92
99
  ev.close
93
100
  end
101
+
102
+ def repeat_set_event_several_times_until_success(event_name)
103
+ retries = 0
104
+ max_retries = 10
105
+ delay_sec = 3
106
+
107
+ begin
108
+ set_event(event_name)
109
+ rescue Errno::ENOENT
110
+ # This error occurs when the supervisor process has not yet created the event.
111
+ # If STOP is immediately executed, this state will occur.
112
+ # Retry `set_event' to wait for the initialization of the supervisor.
113
+ retries += 1
114
+ raise if max_retries < retries
115
+ sleep(delay_sec)
116
+ retry
117
+ end
118
+ end
119
+
120
+ def wait_supervisor_finished
121
+ repeat_set_event_several_times_until_success(@service_name)
122
+ Process.waitpid(@pid)
123
+ end
94
124
  end
95
125
 
96
126
  FluentdService.new(opts[:service_name]).mainloop
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.1
4
+ version: 1.19.0
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -200,6 +199,76 @@ dependencies:
200
199
  - - "~>"
201
200
  - !ruby/object:Gem::Version
202
201
  version: '1.4'
202
+ - !ruby/object:Gem::Dependency
203
+ name: zstd-ruby
204
+ requirement: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '1.5'
209
+ type: :runtime
210
+ prerelease: false
211
+ version_requirements: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '1.5'
216
+ - !ruby/object:Gem::Dependency
217
+ name: uri
218
+ requirement: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '1.0'
223
+ type: :runtime
224
+ prerelease: false
225
+ version_requirements: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '1.0'
230
+ - !ruby/object:Gem::Dependency
231
+ name: async-http
232
+ requirement: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '0.86'
237
+ type: :runtime
238
+ prerelease: false
239
+ version_requirements: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '0.86'
244
+ - !ruby/object:Gem::Dependency
245
+ name: io-event
246
+ requirement: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "<"
249
+ - !ruby/object:Gem::Version
250
+ version: 1.11.0
251
+ type: :runtime
252
+ prerelease: false
253
+ version_requirements: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "<"
256
+ - !ruby/object:Gem::Version
257
+ version: 1.11.0
258
+ - !ruby/object:Gem::Dependency
259
+ name: io-stream
260
+ requirement: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "<"
263
+ - !ruby/object:Gem::Version
264
+ version: 0.8.0
265
+ type: :runtime
266
+ prerelease: false
267
+ version_requirements: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "<"
270
+ - !ruby/object:Gem::Version
271
+ version: 0.8.0
203
272
  - !ruby/object:Gem::Dependency
204
273
  name: base64
205
274
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +381,20 @@ dependencies:
312
381
  - - "~>"
313
382
  - !ruby/object:Gem::Version
314
383
  version: 0.1.7
384
+ - !ruby/object:Gem::Dependency
385
+ name: fiddle
386
+ requirement: !ruby/object:Gem::Requirement
387
+ requirements:
388
+ - - "~>"
389
+ - !ruby/object:Gem::Version
390
+ version: '1.1'
391
+ type: :runtime
392
+ prerelease: false
393
+ version_requirements: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - "~>"
396
+ - !ruby/object:Gem::Version
397
+ version: '1.1'
315
398
  - !ruby/object:Gem::Dependency
316
399
  name: rake
317
400
  requirement: !ruby/object:Gem::Requirement
@@ -445,33 +528,19 @@ dependencies:
445
528
  - !ruby/object:Gem::Version
446
529
  version: '4'
447
530
  - !ruby/object:Gem::Dependency
448
- name: async
531
+ name: console
449
532
  requirement: !ruby/object:Gem::Requirement
450
533
  requirements:
451
534
  - - "~>"
452
535
  - !ruby/object:Gem::Version
453
- version: '1.23'
536
+ version: '1.30'
454
537
  type: :development
455
538
  prerelease: false
456
539
  version_requirements: !ruby/object:Gem::Requirement
457
540
  requirements:
458
541
  - - "~>"
459
542
  - !ruby/object:Gem::Version
460
- version: '1.23'
461
- - !ruby/object:Gem::Dependency
462
- name: async-http
463
- requirement: !ruby/object:Gem::Requirement
464
- requirements:
465
- - - ">="
466
- - !ruby/object:Gem::Version
467
- version: 0.50.0
468
- type: :development
469
- prerelease: false
470
- version_requirements: !ruby/object:Gem::Requirement
471
- requirements:
472
- - - ">="
473
- - !ruby/object:Gem::Version
474
- version: 0.50.0
543
+ version: '1.30'
475
544
  - !ruby/object:Gem::Dependency
476
545
  name: aws-sigv4
477
546
  requirement: !ruby/object:Gem::Requirement
@@ -533,6 +602,7 @@ extensions: []
533
602
  extra_rdoc_files: []
534
603
  files:
535
604
  - ".deepsource.toml"
605
+ - ".rubocop.yml"
536
606
  - ADOPTERS.md
537
607
  - AUTHORS
538
608
  - CHANGELOG.md
@@ -727,6 +797,7 @@ files:
727
797
  - lib/fluent/plugin/metrics.rb
728
798
  - lib/fluent/plugin/metrics_local.rb
729
799
  - lib/fluent/plugin/multi_output.rb
800
+ - lib/fluent/plugin/out_buffer.rb
730
801
  - lib/fluent/plugin/out_copy.rb
731
802
  - lib/fluent/plugin/out_exec.rb
732
803
  - lib/fluent/plugin/out_exec_filter.rb
@@ -781,9 +852,6 @@ files:
781
852
  - lib/fluent/plugin_helper/formatter.rb
782
853
  - lib/fluent/plugin_helper/http_server.rb
783
854
  - lib/fluent/plugin_helper/http_server/app.rb
784
- - lib/fluent/plugin_helper/http_server/compat/server.rb
785
- - lib/fluent/plugin_helper/http_server/compat/ssl_context_extractor.rb
786
- - lib/fluent/plugin_helper/http_server/compat/webrick_handler.rb
787
855
  - lib/fluent/plugin_helper/http_server/methods.rb
788
856
  - lib/fluent/plugin_helper/http_server/request.rb
789
857
  - lib/fluent/plugin_helper/http_server/router.rb
@@ -808,6 +876,7 @@ files:
808
876
  - lib/fluent/registry.rb
809
877
  - lib/fluent/root_agent.rb
810
878
  - lib/fluent/rpc.rb
879
+ - lib/fluent/source_only_buffer_agent.rb
811
880
  - lib/fluent/static_config_analysis.rb
812
881
  - lib/fluent/supervisor.rb
813
882
  - lib/fluent/system_config.rb
@@ -865,8 +934,11 @@ files:
865
934
  homepage: https://www.fluentd.org/
866
935
  licenses:
867
936
  - Apache-2.0
868
- metadata: {}
869
- post_install_message:
937
+ metadata:
938
+ homepage_uri: https://www.fluentd.org/
939
+ source_code_uri: https://github.com/fluent/fluentd
940
+ changelog_uri: https://github.com/fluent/fluentd/blob/master/CHANGELOG.md
941
+ bug_tracker_uri: https://github.com/fluent/fluentd/issues
870
942
  rdoc_options: []
871
943
  require_paths:
872
944
  - lib
@@ -874,15 +946,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
874
946
  requirements:
875
947
  - - ">="
876
948
  - !ruby/object:Gem::Version
877
- version: '2.7'
949
+ version: '3.2'
878
950
  required_rubygems_version: !ruby/object:Gem::Requirement
879
951
  requirements:
880
952
  - - ">="
881
953
  - !ruby/object:Gem::Version
882
954
  version: '0'
883
955
  requirements: []
884
- rubygems_version: 3.4.19
885
- signing_key:
956
+ rubygems_version: 3.6.8
886
957
  specification_version: 4
887
958
  summary: Fluentd event collector
888
959
  test_files: []
@@ -1,92 +0,0 @@
1
- #
2
- # Fluentd
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
16
-
17
- require 'fluent/plugin_helper/http_server/methods'
18
- require 'fluent/plugin_helper/http_server/compat/webrick_handler'
19
- require 'fluent/plugin_helper/http_server/compat/ssl_context_extractor'
20
-
21
- module Fluent
22
- module PluginHelper
23
- module HttpServer
24
- module Compat
25
- class Server
26
- # @param logger [Logger]
27
- # @param default_app [Object] ignored option. only for compat
28
- # @param tls_context [OpenSSL::SSL::SSLContext]
29
- def initialize(addr:, port:, logger:, default_app: nil, tls_context: nil)
30
- @addr = addr
31
- @port = port
32
- @logger = logger
33
-
34
- config = {
35
- BindAddress: @addr,
36
- Port: @port,
37
- Logger: WEBrick::Log.new(STDERR, WEBrick::Log::FATAL),
38
- AccessLog: [],
39
- }
40
- if tls_context
41
- require 'webrick/https'
42
- @logger.warn('Webrick ignores given TLS version')
43
- tls_opt = Fluent::PluginHelper::HttpServer::Compat::SSLContextExtractor.extract(tls_context)
44
- config = tls_opt.merge(**config)
45
- end
46
-
47
- @server = WEBrick::HTTPServer.new(config)
48
-
49
- # @example ["/example.json", :get, handler object]
50
- @methods = []
51
-
52
- if block_given?
53
- yield(self)
54
- end
55
- end
56
-
57
- def start(notify = nil)
58
- build_handler
59
- notify.push(:ready)
60
- @logger.debug('Start webrick HTTP server listening')
61
- @server.start
62
- end
63
-
64
- def stop
65
- @server.shutdown
66
- @server.stop
67
- end
68
-
69
- HttpServer::Methods::ALL.map { |e| e.downcase.to_sym }.each do |name|
70
- define_method(name) do |path, app = nil, &block|
71
- if (block && app) || (!block && !app)
72
- raise 'You must specify either app or block in the same time'
73
- end
74
-
75
- # Do not build a handler class here to able to handle multiple methods for single path.
76
- @methods << [path, name, app || block]
77
- end
78
- end
79
-
80
- private
81
-
82
- def build_handler
83
- @methods.group_by(&:first).each do |(path, rest)|
84
- klass = Fluent::PluginHelper::HttpServer::Compat::WebrickHandler.build(**Hash[rest.map { |e| [e[1], e[2]] }])
85
- @server.mount(path, klass)
86
- end
87
- end
88
- end
89
- end
90
- end
91
- end
92
- end