Skip to content

Commit

Permalink
in out: simplify comfig_param style
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Apr 12, 2017
1 parent 3d891ea commit 53ada80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions lib/fluent/plugin/in_groonga.rb
Expand Up @@ -33,14 +33,7 @@ def initialize
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
Expand Down
9 changes: 1 addition & 8 deletions lib/fluent/plugin/out_groonga.rb
Expand Up @@ -29,14 +29,7 @@ def initialize
super
end

config_param :protocol, :default => :http do |value|
case value
when "http", "gqtp", "command"
value.to_sym
else
raise ConfigError, "must be http, gqtp or command: <#{value}>"
end
end
config_param :protocol, :enum, :list => [:http, :gqtp, :command], :default => :http

# alias is just for backward compatibility
config_param :store_table, :string, :default => nil, :alias => :table
Expand Down

0 comments on commit 53ada80

Please sign in to comment.