Sha256: 17775546ce432ac31a2dc8f8c3ac5f4cd681c49642bfcefcec94ab5f3edd7a49

Contents?: true

Size: 482 Bytes

Versions: 4

Compression:

Stored size: 482 Bytes

Contents

require 'faraday'
require 'logger'

require_relative 'utils'
require_relative 'base'

module Kishu
  class Pipeline 

    def initialize
      @conn = Faraday.new(:url => LOGSTASH_HOST)
      # logger = Logger.new(STDOUT)
      # logger.info 
    end

    def is_ready?
      main  = @conn.get do |req|
        req.url '/_node/stats/pipelines/main'
      end
      return nil unless main.dig("pipelines","main","events","out") == 0
    end

    def is_running?

    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kishu-1.0.1 lib/kishu/pipeline.rb
kishu-1.0.0 lib/kishu/pipeline.rb
kishu-0.0.1 lib/kishu/pipeline.rb
kishu-0.0.0 lib/kishu/pipeline.rb