Sha256: d2309a744639eb8b436b8a0cd872d51db1166c6fe78cb4fe951fea733dfaff43
Contents?: true
Size: 782 Bytes
Versions: 9
Compression:
Stored size: 782 Bytes
Contents
require "logstash/outputs/base" require "logstash/namespace" require "em-jack" class LogStash::Outputs::Beanstalk < LogStash::Outputs::Base public def initialize(url, config={}, &block) super @ttr = @urlopts["ttr"] || 300; if @url.path == "" or @url.path == "/" raise "must specify a tube for beanstalk output" end end public def register tube = @url.path[1..-1] # Skip leading '/' port = @url.port || 11300 @beanstalk = EMJack::Connection.new(:host => @url.host, :port => port, :tube => tube) end # def register public def receive(event) @beanstalk.put(event.to_json, :ttr => @ttr) end # def receive end # class LogStash::Outputs::Beanstalk
Version data entries
9 entries across 9 versions & 1 rubygems