Class: KafkaCli::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka_cli/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#confObject (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

#clusterObject



16
17
18
# File 'lib/kafka_cli/service.rb', line 16

def cluster
  @cluster ||= ClusterService.new(kafka_client: kafka_client)
end

#kafka_clientObject



24
25
26
# File 'lib/kafka_cli/service.rb', line 24

def kafka_client
  @kafka_client = KafkaClient.new(conf: conf)
end

#topicObject



20
21
22
# File 'lib/kafka_cli/service.rb', line 20

def topic
  @topic ||= TopicService.new(kafka_client: kafka_client)
end