Sha256: 897caab355f6436d12bade0fb1df866e02146918e2566ca2fbd4e9bce454f980
Contents?: true
Size: 543 Bytes
Versions: 11
Compression:
Stored size: 543 Bytes
Contents
require "logstash/namespace" require "logstash/ruby_fixes" require "uri" module LogStash::Inputs def self.from_url(url, type, &block) # Assume file paths if we start with "/" url = "file://#{url}" if url.start_with?("/") uri = URI.parse(url) # TODO(sissel): Add error handling # TODO(sissel): Allow plugin paths klass = uri.scheme.capitalize file = uri.scheme require "logstash/inputs/#{file}" LogStash::Inputs.const_get(klass).new(uri, type, &block) end # def from_url end # module LogStash::Inputs
Version data entries
11 entries across 11 versions & 1 rubygems