lib/fluent/plugin/in_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-0.0.3 vs lib/fluent/plugin/in_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-0.0.4
- old
+ new
@@ -1,9 +1,11 @@
require 'gcloud'
+require 'fluent/input'
+require 'fluent/parser'
module Fluent
- class GcloudPubSubInput < Fluent::Input
+ class GcloudPubSubInput < Input
Fluent::Plugin.register_input('gcloud_pubsub', self)
config_param :tag, :string
config_param :project, :string, :default => nil
config_param :topic, :string, :default => nil
@@ -31,11 +33,11 @@
configure_parser(conf)
end
def configure_parser(conf)
- @parser = TextParser.new
+ @parser = Fluent::TextParser.new
@parser.configure(conf)
end
def start
super
@@ -54,10 +56,10 @@
@subscribe_thread.join
end
private
def configure_parser(conf)
- @parser = TextParser.new
+ @parser = Fluent::TextParser.new
@parser.configure(conf)
end
def subscribe
until @stop_subscribing