Class: Rdkafka::Callbacks::IncrementalAlterConfigsResult

Inherits:
Object
  • Object
show all
Defined in:
lib/rdkafka/callbacks.rb

Overview

Extracts attributes of rd_kafka_IncrementalAlterConfigs_result_t

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_ptr) ⇒ IncrementalAlterConfigsResult

Returns a new instance of IncrementalAlterConfigsResult.

Parameters:

  • event_ptr (FFI::Pointer)

    pointer to the event



168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/rdkafka/callbacks.rb', line 168

def initialize(event_ptr)
  @results = []
  @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
    incremental_alter_result = Rdkafka::Bindings.rd_kafka_event_IncrementalAlterConfigs_result(event_ptr)
    # Get the number of matching acls
    pointer_to_size_t = FFI::MemoryPointer.new(:int32)
    @results = Rdkafka::Bindings.rd_kafka_IncrementalAlterConfigs_result_resources(incremental_alter_result, pointer_to_size_t)
    @results_count = pointer_to_size_t.read_int
  end
end

Instance Attribute Details

#error_stringObject (readonly)

Returns the value of attribute error_string.



165
166
167
# File 'lib/rdkafka/callbacks.rb', line 165

def error_string
  @error_string
end

#result_errorObject (readonly)

Returns the value of attribute result_error.



165
166
167
# File 'lib/rdkafka/callbacks.rb', line 165

def result_error
  @result_error
end

#resultsObject (readonly)

Returns the value of attribute results.



165
166
167
# File 'lib/rdkafka/callbacks.rb', line 165

def results
  @results
end

#results_countObject (readonly)

Returns the value of attribute results_count.



165
166
167
# File 'lib/rdkafka/callbacks.rb', line 165

def results_count
  @results_count
end