class TestKafka::Cluster
Attributes
broker[R]
zookeeper[R]
Public Class Methods
new(kafka_path, tmp_dir, kafka_port, zk_port)
click to toggle source
# File lib/test_kafka/cluster.rb, line 6 def initialize(kafka_path, tmp_dir, kafka_port, zk_port) @zookeeper = Zookeeper.new(kafka_path, tmp_dir, zk_port) @broker = Broker.new(kafka_path, tmp_dir, kafka_port, zk_port) end
Public Instance Methods
start()
click to toggle source
# File lib/test_kafka/cluster.rb, line 13 def start @zookeeper.start @broker.start self end
stop()
click to toggle source
# File lib/test_kafka/cluster.rb, line 20 def stop @zookeeper.stop @broker.stop self end
with_interruption(&block)
click to toggle source
# File lib/test_kafka/cluster.rb, line 27 def with_interruption(&block) @broker.with_interruption(&block) end