Class: Heller::OffsetResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/heller/offset_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(underlying) ⇒ OffsetResponse

Returns a new instance of OffsetResponse.



5
6
7
# File 'lib/heller/offset_response.rb', line 5

def initialize(underlying)
  @underlying = underlying
end

Instance Method Details

#error(topic, partition) ⇒ Object



17
18
19
# File 'lib/heller/offset_response.rb', line 17

def error(topic, partition)
  convert_error { @underlying.error_code(topic, partition) }
end

#error?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/heller/offset_response.rb', line 13

def error?
  @underlying.has_error?
end

#offsets(topic, partition) ⇒ Object



9
10
11
# File 'lib/heller/offset_response.rb', line 9

def offsets(topic, partition)
  convert_error { @underlying.offsets(topic, partition).to_a }
end