Class: KafkaCli::Service
- Inherits:
-
Object
- Object
- KafkaCli::Service
- Defined in:
- lib/kafka_cli/service.rb
Instance Attribute Summary collapse
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
Instance Method Summary collapse
- #cluster ⇒ Object
-
#initialize(conf:) ⇒ Service
constructor
A new instance of Service.
- #kafka_client ⇒ Object
- #topic ⇒ Object
Constructor Details
#initialize(conf:) ⇒ Service
Returns a new instance of Service.
12 13 14 |
# File 'lib/kafka_cli/service.rb', line 12 def initialize(conf:) @conf = conf end |
Instance Attribute Details
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
10 11 12 |
# File 'lib/kafka_cli/service.rb', line 10 def conf @conf end |
Instance Method Details
#cluster ⇒ Object
16 17 18 |
# File 'lib/kafka_cli/service.rb', line 16 def cluster @cluster ||= ClusterService.new(kafka_client: kafka_client) end |
#kafka_client ⇒ Object
24 25 26 |
# File 'lib/kafka_cli/service.rb', line 24 def kafka_client @kafka_client = KafkaClient.new(conf: conf) end |
#topic ⇒ Object
20 21 22 |
# File 'lib/kafka_cli/service.rb', line 20 def topic @topic ||= TopicService.new(kafka_client: kafka_client) end |