Class: Rdkafka::Callbacks::DescribeAclResult

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

Overview

Extracts attributes of rd_kafka_DeleteAcls_result_response_t

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_ptr) ⇒ DescribeAclResult

Returns a new instance of DescribeAclResult.

Parameters:

  • event_ptr (FFI::Pointer)

    pointer to the event



125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/rdkafka/callbacks.rb', line 125

def initialize(event_ptr)
  @matching_acls = []
  @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
    acl_describe_result = Rdkafka::Bindings.rd_kafka_event_DescribeAcls_result(event_ptr)
    # Get the number of matching acls
    pointer_to_size_t = FFI::MemoryPointer.new(:int32)
    @matching_acls = Rdkafka::Bindings.rd_kafka_DescribeAcls_result_acls(acl_describe_result, pointer_to_size_t)
    @matching_acls_count = pointer_to_size_t.read_int
  end
end

Instance Attribute Details

#error_stringObject (readonly)

Returns the value of attribute error_string.



122
123
124
# File 'lib/rdkafka/callbacks.rb', line 122

def error_string
  @error_string
end

#matching_aclsObject (readonly)

Returns the value of attribute matching_acls.



122
123
124
# File 'lib/rdkafka/callbacks.rb', line 122

def matching_acls
  @matching_acls
end

#matching_acls_countObject (readonly)

Returns the value of attribute matching_acls_count.



122
123
124
# File 'lib/rdkafka/callbacks.rb', line 122

def matching_acls_count
  @matching_acls_count
end

#result_errorObject (readonly)

Returns the value of attribute result_error.



122
123
124
# File 'lib/rdkafka/callbacks.rb', line 122

def result_error
  @result_error
end