Class: Rdkafka::Callbacks::DescribeConfigsResult

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

Overview

Extracts attributes of rd_kafka_DescribeConfigs_result_t

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_ptr) ⇒ DescribeConfigsResult

Returns a new instance of DescribeConfigsResult.

Parameters:

  • event_ptr (FFI::Pointer)

    pointer to the event



146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/rdkafka/callbacks.rb', line 146

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
    configs_describe_result = Rdkafka::Bindings.rd_kafka_event_DescribeConfigs_result(event_ptr)
    # Get the number of matching acls
    pointer_to_size_t = FFI::MemoryPointer.new(:int32)
    @results = Rdkafka::Bindings.rd_kafka_DescribeConfigs_result_resources(configs_describe_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.



143
144
145
# File 'lib/rdkafka/callbacks.rb', line 143

def error_string
  @error_string
end

#result_errorObject (readonly)

Returns the value of attribute result_error.



143
144
145
# File 'lib/rdkafka/callbacks.rb', line 143

def result_error
  @result_error
end

#resultsObject (readonly)

Returns the value of attribute results.



143
144
145
# File 'lib/rdkafka/callbacks.rb', line 143

def results
  @results
end

#results_countObject (readonly)

Returns the value of attribute results_count.



143
144
145
# File 'lib/rdkafka/callbacks.rb', line 143

def results_count
  @results_count
end