lib/kafka.rb in ruby-kafka-0.1.0.pre.alpha vs lib/kafka.rb in ruby-kafka-0.1.0.pre.alpha2
- old
+ new
@@ -1,9 +1,19 @@
require "kafka/version"
-require "kafka/cluster"
-require "kafka/producer"
+require "kafka/client"
module Kafka
+ Error = Class.new(StandardError)
+ ConnectionError = Class.new(Error)
+ CorruptMessage = Class.new(Error)
+ UnknownError = Class.new(Error)
+ OffsetOutOfRange = Class.new(Error)
+ UnknownTopicOrPartition = Class.new(Error)
+ InvalidMessageSize = Class.new(Error)
+ LeaderNotAvailable = Class.new(Error)
+ NotLeaderForPartition = Class.new(Error)
+ RequestTimedOut = Class.new(Error)
+
def self.new(**options)
- Cluster.new(**options)
+ Client.new(**options)
end
end