Class: Rdkafka::Admin::DescribeConfigsReport
- Inherits:
-
Object
- Object
- Rdkafka::Admin::DescribeConfigsReport
- Defined in:
- lib/rdkafka/admin/describe_configs_report.rb
Overview
Report for describe configs operation result
Instance Attribute Summary collapse
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
-
#initialize(config_entries:, entry_count:) ⇒ DescribeConfigsReport
constructor
A new instance of DescribeConfigsReport.
Constructor Details
#initialize(config_entries:, entry_count:) ⇒ DescribeConfigsReport
Returns a new instance of DescribeConfigsReport.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/rdkafka/admin/describe_configs_report.rb', line 11 def initialize(config_entries:, entry_count:) @resources = [] return if config_entries == FFI::Pointer::NULL config_entries .read_array_of_pointer(entry_count) .each { |config_resource_result_ptr| validate!(config_resource_result_ptr) } .each do |config_resource_result_ptr| config_resource_result = ConfigResourceBindingResult.new(config_resource_result_ptr) pointer_to_size_t = FFI::MemoryPointer.new(:int32) configs_ptr = Bindings.rd_kafka_ConfigResource_configs( config_resource_result_ptr, pointer_to_size_t ) configs_ptr .read_array_of_pointer(pointer_to_size_t.read_int) .map { |config_ptr| ConfigBindingResult.new(config_ptr) } .each { |config_binding| config_resource_result.configs << config_binding } @resources << config_resource_result end ensure return if config_entries == FFI::Pointer::NULL Bindings.rd_kafka_ConfigResource_destroy_array(config_entries, entry_count) end |
Instance Attribute Details
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
7 8 9 |
# File 'lib/rdkafka/admin/describe_configs_report.rb', line 7 def resources @resources end |