Class: MicroserviceHarness::Configuration
- Inherits:
-
Object
- Object
- MicroserviceHarness::Configuration
- Defined in:
- lib/harness/configuration.rb
Instance Attribute Summary collapse
-
#auto_commit ⇒ Object
Returns the value of attribute auto_commit.
-
#consumer_group_id ⇒ Object
Returns the value of attribute consumer_group_id.
-
#kafka_hosts ⇒ Object
Returns the value of attribute kafka_hosts.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
-
#topic ⇒ Object
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 28 |
# File 'lib/harness/configuration.rb', line 22 def initialize @kafka_hosts = ENV.fetch('KAFKA_ADDRESSES', "192.168.235.136").split(",").first @topic = "sofadog" @consumer_group_id = nil @log_level = :info @auto_commit = false end |
Instance Attribute Details
#auto_commit ⇒ Object
Returns the value of attribute auto_commit.
20 21 22 |
# File 'lib/harness/configuration.rb', line 20 def auto_commit @auto_commit end |
#consumer_group_id ⇒ Object
Returns the value of attribute consumer_group_id.
17 18 19 |
# File 'lib/harness/configuration.rb', line 17 def consumer_group_id @consumer_group_id end |
#kafka_hosts ⇒ Object
Returns the value of attribute kafka_hosts.
15 16 17 |
# File 'lib/harness/configuration.rb', line 15 def kafka_hosts @kafka_hosts end |
#log_level ⇒ Object
Returns the value of attribute log_level.
18 19 20 |
# File 'lib/harness/configuration.rb', line 18 def log_level @log_level end |
#service_name ⇒ Object
Returns the value of attribute service_name.
19 20 21 |
# File 'lib/harness/configuration.rb', line 19 def service_name @service_name end |
#topic ⇒ Object
Returns the value of attribute topic.
16 17 18 |
# File 'lib/harness/configuration.rb', line 16 def topic @topic end |