Sha256: df1319c6aa8150b5a90cca4363a9a784011936bf153ae7fea780f2a5eed83717

Contents?: true

Size: 531 Bytes

Versions: 68

Compression:

Stored size: 531 Bytes

Contents

# encoding: utf-8
require "logstash/namespace"
require "logstash/json"

module LogStash module Modules class KibanaBase
  attr_reader :import_path, :content

  def initialize(import_path, content)
    @import_path, @content = import_path, content
  end

  def import(client)
    raise NotImplementedError, "#{self.class.name} needs to implement `#import`"
  end

  def to_s
    import_path
  end

  def content_as_object
    return content unless content.is_a?(String)
    LogStash::Json.load(content) rescue nil
  end
end end end

Version data entries

68 entries across 68 versions & 5 rubygems

Version Path
logstash-core-6.0.0.rc2-java lib/logstash/modules/kibana_base.rb
logstash-core-5.6.3-java lib/logstash/modules/kibana_base.rb
logstash-core-6.0.0.rc1-java lib/logstash/modules/kibana_base.rb
logstash-core-5.6.2-java lib/logstash/modules/kibana_base.rb
logstash-core-5.6.1-java lib/logstash/modules/kibana_base.rb
logstash-core-5.6.0-java lib/logstash/modules/kibana_base.rb
logstash-core-6.0.0.beta2-java lib/logstash/modules/kibana_base.rb
logstash-core-6.0.0.beta1-java lib/logstash/modules/kibana_base.rb