diff --git a/lib/fluent/plugin/out_forward.rb b/lib/fluent/plugin/out_forward.rb index 27c9688ece..75f76c37a4 100644 --- a/lib/fluent/plugin/out_forward.rb +++ b/lib/fluent/plugin/out_forward.rb @@ -225,7 +225,7 @@ def configure(conf) configs << { type: @service_discovery[i][:@type], conf: c } end - create_service_discovery_manager( + service_disovery_create_manager( :out_forward_service_discovery_watcher, configurations: configs, load_balancer: LoadBalancer.new(log), diff --git a/lib/fluent/plugin_helper/service_discovery.rb b/lib/fluent/plugin_helper/service_discovery.rb index 9e46c8bde1..c9143ac1c4 100644 --- a/lib/fluent/plugin_helper/service_discovery.rb +++ b/lib/fluent/plugin_helper/service_discovery.rb @@ -48,7 +48,7 @@ def start # @param configurations [Hash] hash which must has discivery_service type and its configuration like `{ type: :static, conf: }` # @param load_balancer [Object] object which has two methods #rebalance and #select_service # @param custom_build_method [Proc] - def create_service_discovery_manager(title, configurations:, load_balancer: nil, custom_build_method: nil, interval: 3) + def service_disovery_create_manager(title, configurations:, load_balancer: nil, custom_build_method: nil, interval: 3) @_plugin_helper_service_discovery_title = title @_plugin_helper_service_discovery_iterval = interval diff --git a/test/plugin_helper/test_service_discovery.rb b/test/plugin_helper/test_service_discovery.rb index ec16ca0402..a5e5bac7a5 100644 --- a/test/plugin_helper/test_service_discovery.rb +++ b/test/plugin_helper/test_service_discovery.rb @@ -11,7 +11,7 @@ class Dummy < Fluent::Plugin::TestBase helpers :service_discovery # Make these mehtod public - def create_service_discovery_manager(title, configurations:, load_balancer: nil, custom_build_method: nil, interval: 3) + def service_disovery_create_manager(title, configurations:, load_balancer: nil, custom_build_method: nil, interval: 3) super end @@ -38,7 +38,7 @@ def discovery_manager test 'start discovery manager' do d = @d = Dummy.new - d.create_service_discovery_manager( + d.service_disovery_create_manager( :service_discovery_helper_test, configurations: [{ type: :static, conf: config_element('root', '', {}, [config_element('service', '', { 'host' => '127.0.0.1', 'port' => '1234' })]) }], ) @@ -59,7 +59,7 @@ def discovery_manager test 'call timer_execute if dynamic configuration' do d = @d = Dummy.new - d.create_service_discovery_manager( + d.service_disovery_create_manager( :service_discovery_helper_test, configurations: [{ type: :file, conf: config_element('file_config', '', { 'path' => File.join(@sd_file_dir, 'config.yml') }) }], )