Sha256: 1f46ab2f5ce5a282353920e7477317f7e44df2875059a1d18827ae16eb503014

Contents?: true

Size: 547 Bytes

Versions: 20

Compression:

Stored size: 547 Bytes

Contents

require 'fluent/plugin/out_copy'
require 'fluent/plugin/out_mongo'


module Fluent


class MongoBackupOutput < CopyOutput
  Fluent::Plugin.register_output('mongo_backup', self)

  class MongoOutputForBackup < MongoOutput
    config_param :database, :string, :default => 'fluent'
    config_param :collection, :string, :default => 'out_mongo_backup'

    # TODO: optimize
  end

  def configure(conf)
    super

    backup = MongoOutputForBackup.new
    backup.configure(conf.merge({'capped' => true}))
    @outputs.unshift(backup)
  end
end


end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fluent-plugin-mongo-0.7.0 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.13 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.12 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.11 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.10 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.9 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.8 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.7 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.6 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.5 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.4 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.3 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.2 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.1 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.6.0 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.5.3 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.5.2 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.5.1 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.5.0 lib/fluent/plugin/out_mongo_backup.rb
fluent-plugin-mongo-0.4.0 lib/fluent/plugin/out_mongo_backup.rb