mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- refactor configs (all inherit from BaseConfig) - move beef of agent code to lib/net/clients/ - use optionparser's ".order" instead of ".parse"
15 lines
356 B
Ruby
15 lines
356 B
Ruby
require "lib/config/base"
|
|
|
|
module LogStash; module Config
|
|
class AgentConfig < BaseConfig
|
|
attr_reader :sources
|
|
attr_reader :logstash_dir
|
|
|
|
def initialize(file)
|
|
super(file)
|
|
obj = YAML::load(File.open(file).read())
|
|
|
|
@sources = obj["sources"]
|
|
end # def initialize
|
|
end # class AgentConfig
|
|
end; end # module LogStash::Config
|