Class: Rdkafka::Callbacks::ListOffsetsResult
- Inherits:
-
Object
- Object
- Rdkafka::Callbacks::ListOffsetsResult
- Defined in:
- lib/rdkafka/callbacks.rb
Overview
Extracts attributes of rd_kafka_ListOffsets_result_t
Instance Attribute Summary collapse
-
#error_string ⇒ Object
readonly
Returns the value of attribute error_string.
-
#result_count ⇒ Object
readonly
Returns the value of attribute result_count.
-
#result_error ⇒ Object
readonly
Returns the value of attribute result_error.
-
#result_infos ⇒ Object
readonly
Returns the value of attribute result_infos.
Instance Method Summary collapse
-
#initialize(event_ptr) ⇒ ListOffsetsResult
constructor
A new instance of ListOffsetsResult.
Constructor Details
#initialize(event_ptr) ⇒ ListOffsetsResult
Returns a new instance of ListOffsetsResult.
190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/rdkafka/callbacks.rb', line 190 def initialize(event_ptr) @result_infos = FFI::Pointer::NULL @result_error = Rdkafka::Bindings.rd_kafka_event_error(event_ptr) @error_string = Rdkafka::Bindings.rd_kafka_event_error_string(event_ptr) if @result_error == Rdkafka::Bindings::RD_KAFKA_RESP_ERR_NO_ERROR list_offsets_result = Rdkafka::Bindings.rd_kafka_event_ListOffsets_result(event_ptr) pointer_to_size_t = FFI::MemoryPointer.new(:size_t) @result_infos = Rdkafka::Bindings.rd_kafka_ListOffsets_result_infos(list_offsets_result, pointer_to_size_t) @result_count = pointer_to_size_t.read(:size_t) end end |
Instance Attribute Details
#error_string ⇒ Object (readonly)
Returns the value of attribute error_string.
187 188 189 |
# File 'lib/rdkafka/callbacks.rb', line 187 def error_string @error_string end |
#result_count ⇒ Object (readonly)
Returns the value of attribute result_count.
187 188 189 |
# File 'lib/rdkafka/callbacks.rb', line 187 def result_count @result_count end |
#result_error ⇒ Object (readonly)
Returns the value of attribute result_error.
187 188 189 |
# File 'lib/rdkafka/callbacks.rb', line 187 def result_error @result_error end |
#result_infos ⇒ Object (readonly)
Returns the value of attribute result_infos.
187 188 189 |
# File 'lib/rdkafka/callbacks.rb', line 187 def result_infos @result_infos end |