Sha256: ca983945d923621d96eb607c04262ea9d9d47f4a727f0c96fbee58ae40f4431b
Contents?: true
Size: 662 Bytes
Versions: 121
Compression:
Stored size: 662 Bytes
Contents
module LogStash; class OutputDelegatorStrategyRegistry class InvalidStrategyError < StandardError; end # This is generally used as a singleton # Except perhaps during testing def self.instance @instance ||= self.new end def initialize() @map = {} end def classes @map.values end def types @map.keys end def class_for(type) klass = @map[type] if !klass raise InvalidStrategyError, "Could not find output delegator strategy of type '#{type}'. Valid strategies: #{@strategy_registry.types}" end klass end def register(type, klass) @map[type] = klass end end; end
Version data entries
121 entries across 118 versions & 14 rubygems