Class: KafkaCli::ClusterService
- Inherits:
-
Object
- Object
- KafkaCli::ClusterService
- Defined in:
- lib/kafka_cli/cluster_service.rb
Instance Attribute Summary collapse
-
#kafka_client ⇒ Object
readonly
Returns the value of attribute kafka_client.
Instance Method Summary collapse
-
#initialize(kafka_client:) ⇒ ClusterService
constructor
A new instance of ClusterService.
- #list_brokers(options: {}) ⇒ Object
Constructor Details
#initialize(kafka_client:) ⇒ ClusterService
Returns a new instance of ClusterService.
7 8 9 |
# File 'lib/kafka_cli/cluster_service.rb', line 7 def initialize(kafka_client:) @kafka_client = kafka_client end |
Instance Attribute Details
#kafka_client ⇒ Object (readonly)
Returns the value of attribute kafka_client.
5 6 7 |
# File 'lib/kafka_cli/cluster_service.rb', line 5 def kafka_client @kafka_client end |
Instance Method Details
#list_brokers(options: {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/kafka_cli/cluster_service.rb', line 11 def list_brokers(options: {}) kafka_client.brokers do |broker| puts broker end end |