# File lib/graphite-api/utils.rb, line 65 def default_middleware_options default_options.merge(:interval => 60) end
# File lib/graphite-api/utils.rb, line 50 def default_options { :backends => [], :cleaner_interval => 43200, :port => 2003, :log_level => :info, :cache => nil, :host => "localhost", :prefix => [], :interval => 0, :slice => 60, :pid => "/tmp/graphite-middleware.pid" } end
# File lib/graphite-api/utils.rb, line 39 def expand_host host if host =~ /:\/\// uri = URI.parse host [ uri.host, uri.port || default_options[:port] ] else host, port = host.split(":") port = port.nil? ? default_options[:port] : port.to_i [ host, port] end end
Generated with the Darkfish Rdoc Generator 2.