Class: Rdkafka::Callbacks::DeleteAclResult
- Inherits:
-
Object
- Object
- Rdkafka::Callbacks::DeleteAclResult
- Defined in:
- lib/rdkafka/callbacks.rb
Overview
Extracts attributes of rd_kafka_DeleteAcls_result_response_t
Instance Attribute Summary collapse
-
#error_string ⇒ Object
readonly
Returns the value of attribute error_string.
-
#matching_acls ⇒ Object
readonly
Returns the value of attribute matching_acls.
-
#matching_acls_count ⇒ Object
readonly
Returns the value of attribute matching_acls_count.
-
#result_error ⇒ Object
readonly
Returns the value of attribute result_error.
Class Method Summary collapse
-
.delete_acl_results_from_array(count, array_pointer) ⇒ Array<DeleteAclResult>
Array of delete ACL results.
Instance Method Summary collapse
-
#initialize(acl_result_pointer) ⇒ DeleteAclResult
constructor
A new instance of DeleteAclResult.
Constructor Details
#initialize(acl_result_pointer) ⇒ DeleteAclResult
Returns a new instance of DeleteAclResult.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/rdkafka/callbacks.rb', line 94 def initialize(acl_result_pointer) @matching_acls = [] rd_kafka_error_pointer = Rdkafka::Bindings.rd_kafka_DeleteAcls_result_response_error(acl_result_pointer) @result_error = Rdkafka::Bindings.rd_kafka_error_code(rd_kafka_error_pointer) @error_string = Rdkafka::Bindings.rd_kafka_error_string(rd_kafka_error_pointer) if @result_error == Rdkafka::Bindings::RD_KAFKA_RESP_ERR_NO_ERROR # Get the number of matching acls pointer_to_size_t = FFI::MemoryPointer.new(:int32) @matching_acls = Rdkafka::Bindings.rd_kafka_DeleteAcls_result_response_matching_acls(acl_result_pointer, pointer_to_size_t) @matching_acls_count = pointer_to_size_t.read_int end end |
Instance Attribute Details
#error_string ⇒ Object (readonly)
Returns the value of attribute error_string.
91 92 93 |
# File 'lib/rdkafka/callbacks.rb', line 91 def error_string @error_string end |
#matching_acls ⇒ Object (readonly)
Returns the value of attribute matching_acls.
91 92 93 |
# File 'lib/rdkafka/callbacks.rb', line 91 def matching_acls @matching_acls end |
#matching_acls_count ⇒ Object (readonly)
Returns the value of attribute matching_acls_count.
91 92 93 |
# File 'lib/rdkafka/callbacks.rb', line 91 def matching_acls_count @matching_acls_count end |
#result_error ⇒ Object (readonly)
Returns the value of attribute result_error.
91 92 93 |
# File 'lib/rdkafka/callbacks.rb', line 91 def result_error @result_error end |
Class Method Details
.delete_acl_results_from_array(count, array_pointer) ⇒ Array<DeleteAclResult>
Returns array of delete ACL results.
110 111 112 113 114 115 |
# File 'lib/rdkafka/callbacks.rb', line 110 def self.delete_acl_results_from_array(count, array_pointer) (1..count).map do |index| result_pointer = (array_pointer + (index - 1)).read_pointer new(result_pointer) end end |