Class: Fluent::StaticConfigAnalysis

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/static_config_analysis.rb

Overview

Static Analysis means analysing all plugins and Fluent::Element without invokeing Plugin#configure

Defined Under Namespace

Modules: Elem Classes: Result

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workers) ⇒ StaticConfigAnalysis

Returns a new instance of StaticConfigAnalysis.



43
44
45
46
47
# File 'lib/fluent/static_config_analysis.rb', line 43

def initialize(workers)
  @workers = workers

  reset
end

Class Method Details

.call(conf, workers: 1) ⇒ Fluent::StaticConfigAnalysis::Result

Parameters:

  • workers (Integer) (defaults to: 1)

    Number of workers

Returns:



39
40
41
# File 'lib/fluent/static_config_analysis.rb', line 39

def self.call(conf, workers: 1)
  new(workers).call(conf)
end

Instance Method Details

#call(config) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/fluent/static_config_analysis.rb', line 49

def call(config)
  reset

  tree = [
    static_worker_analyse(config),
    static_label_analyse(config),
    static_filter_and_output_analyse(config),
    static_input_analyse(config),
  ].flatten

  Result.new(tree, @outputs, @inputs, @filters, @labels.values)
end