Class: Rdkafka::Admin::ConfigBindingResult
- Inherits:
-
Object
- Object
- Rdkafka::Admin::ConfigBindingResult
- Defined in:
- lib/rdkafka/admin/config_binding_result.rb
Overview
A single config binding result that represents its values extracted from C
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#read_only ⇒ Object
readonly
Returns the value of attribute read_only.
-
#sensitive ⇒ Object
readonly
Returns the value of attribute sensitive.
-
#synonym ⇒ Object
readonly
Returns the value of attribute synonym.
-
#synonyms ⇒ Object
readonly
Returns the value of attribute synonyms.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(config_ptr) ⇒ ConfigBindingResult
constructor
A new instance of ConfigBindingResult.
Constructor Details
#initialize(config_ptr) ⇒ ConfigBindingResult
Returns a new instance of ConfigBindingResult.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 10 def initialize(config_ptr) @name = Bindings.rd_kafka_ConfigEntry_name(config_ptr) @value = Bindings.rd_kafka_ConfigEntry_value(config_ptr) @read_only = Bindings.rd_kafka_ConfigEntry_is_read_only(config_ptr) @default = Bindings.rd_kafka_ConfigEntry_is_default(config_ptr) @sensitive = Bindings.rd_kafka_ConfigEntry_is_sensitive(config_ptr) @synonym = Bindings.rd_kafka_ConfigEntry_is_synonym(config_ptr) @synonyms = [] # The code below builds up the config synonyms using same config binding pointer_to_size_t = FFI::MemoryPointer.new(:int32) synonym_ptr = Bindings.rd_kafka_ConfigEntry_synonyms(config_ptr, pointer_to_size_t) synonyms_ptr = synonym_ptr.read_array_of_pointer(pointer_to_size_t.read_int) (1..pointer_to_size_t.read_int).map do |ar| self.class.new synonyms_ptr[ar - 1] end end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def name @name end |
#read_only ⇒ Object (readonly)
Returns the value of attribute read_only.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def read_only @read_only end |
#sensitive ⇒ Object (readonly)
Returns the value of attribute sensitive.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def sensitive @sensitive end |
#synonym ⇒ Object (readonly)
Returns the value of attribute synonym.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def synonym @synonym end |
#synonyms ⇒ Object (readonly)
Returns the value of attribute synonyms.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def synonyms @synonyms end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/rdkafka/admin/config_binding_result.rb', line 7 def value @value end |