Sha256: 589820869a1268cb9bb07b79f04d2c295aeac9523006bd3a2b0f4db2120caab8

Contents?: true

Size: 979 Bytes

Versions: 33

Compression:

Stored size: 979 Bytes

Contents

# encoding: utf-8
# I've decided to take the action strategy, I think this make the code a bit easier to understand.
# maybe in the context of config management we will want to have force kill on the
# threads instead of waiting forever or sending feedback to the host
#
# Some actions could be retryable, or have a delay or timeout.
module LogStash module PipelineAction
  class Base
    # Only used for debugging purpose and in the logger statement.
    def inspect
      "#{self.class.name}/pipeline_id:#{pipeline_id}"
    end
    alias_method :to_s, :inspect

    def execute(agent, pipelines)
      raise "`#execute` Not implemented!"
    end

    # See the definition in `logstash/pipeline_action.rb` for the default ordering
    def execution_priority
      ORDERING.fetch(self.class)
    end

    def <=>(other)
      order = self.execution_priority <=> other.execution_priority
      order.nonzero? ? order : self.pipeline_id <=> other.pipeline_id
    end
  end
end end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
logstash-core-6.6.0-java lib/logstash/pipeline_action/base.rb
logstash-core-7.0.0.alpha2-java lib/logstash/pipeline_action/base.rb
logstash-core-6.5.4-java lib/logstash/pipeline_action/base.rb
logstash-core-6.5.3-java lib/logstash/pipeline_action/base.rb
logstash-core-6.5.2-java lib/logstash/pipeline_action/base.rb
logstash-core-6.5.1-java lib/logstash/pipeline_action/base.rb
logstash-core-7.0.0.alpha1-java lib/logstash/pipeline_action/base.rb
logstash-core-6.5.0-java lib/logstash/pipeline_action/base.rb
logstash-core-6.4.3-java lib/logstash/pipeline_action/base.rb
logstash-core-6.4.2-java lib/logstash/pipeline_action/base.rb
logstash-core-6.4.1-java lib/logstash/pipeline_action/base.rb
logstash-core-6.4.0-java lib/logstash/pipeline_action/base.rb
logstash-core-6.3.2-java lib/logstash/pipeline_action/base.rb
logstash-core-6.3.1-java lib/logstash/pipeline_action/base.rb
logstash-core-6.3.0-java lib/logstash/pipeline_action/base.rb
logstash-core-6.2.4-java lib/logstash/pipeline_action/base.rb
logstash-core-6.2.3-java lib/logstash/pipeline_action/base.rb
logstash-core-6.1.4-java lib/logstash/pipeline_action/base.rb
logstash-core-6.2.2-java lib/logstash/pipeline_action/base.rb
logstash-core-6.2.1-java lib/logstash/pipeline_action/base.rb