[Groonga-commit] groonga/fluent-plugin-groonga at 955d843 [use-v0.14-api] in: simplify config_param style

Back to archive index

Kentaro Hayashi null+****@clear*****
Tue Apr 11 19:03:35 JST 2017


Kentaro Hayashi	2017-04-11 19:03:35 +0900 (Tue, 11 Apr 2017)

  New Revision: 955d84397f571375b138e3cc778cc3bdd2238c1d
  https://github.com/groonga/fluent-plugin-groonga/commit/955d84397f571375b138e3cc778cc3bdd2238c1d

  Message:
    in: simplify config_param style

  Modified files:
    lib/fluent/plugin/in_groonga.rb

  Modified: lib/fluent/plugin/in_groonga.rb (+1 -8)
===================================================================
--- lib/fluent/plugin/in_groonga.rb    2017-04-11 12:27:23 +0900 (eaeff64)
+++ lib/fluent/plugin/in_groonga.rb    2017-04-11 19:03:35 +0900 (0cc4b5f)
@@ -33,14 +33,7 @@ module Fluent
         super
       end
 
-      config_param :protocol, :default => :http do |value|
-        case value
-        when "http", "gqtp"
-          value.to_sym
-        else
-          raise ConfigError, "must be http or gqtp: <#{value}>"
-        end
-      end
+      config_param :protocol, :enum, :list => [:http, :gqtp], :default => :http
 
       def configure(conf)
         super
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index