Class: Rdkafka::Admin::AclBindingResult

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

Overview

Extracts attributes of rd_kafka_AclBinding_t

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matching_acl) ⇒ AclBindingResult

Returns a new instance of AclBindingResult.

Parameters:

  • matching_acl (FFI::Pointer)

    pointer to the ACL binding struct



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 17

def initialize(matching_acl)
  rd_kafka_error_pointer = Rdkafka::Bindings.rd_kafka_AclBinding_error(matching_acl)
  @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 error_string != FFI::Pointer::NULL
    @error_string = error_string.read_string
  end

  @matching_acl_resource_type = Rdkafka::Bindings.rd_kafka_AclBinding_restype(matching_acl)
  matching_acl_resource_name = Rdkafka::Bindings.rd_kafka_AclBinding_name(matching_acl)

  if matching_acl_resource_name != FFI::Pointer::NULL
    @matching_acl_resource_name = matching_acl_resource_name.read_string
  end

  @matching_acl_resource_pattern_type = Rdkafka::Bindings.rd_kafka_AclBinding_resource_pattern_type(matching_acl)
  matching_acl_principal = Rdkafka::Bindings.rd_kafka_AclBinding_principal(matching_acl)

  if matching_acl_principal != FFI::Pointer::NULL
    @matching_acl_principal = matching_acl_principal.read_string
  end

  matching_acl_host = Rdkafka::Bindings.rd_kafka_AclBinding_host(matching_acl)

  if matching_acl_host != FFI::Pointer::NULL
    @matching_acl_host = matching_acl_host.read_string
  end

  @matching_acl_operation = Rdkafka::Bindings.rd_kafka_AclBinding_operation(matching_acl)
  @matching_acl_permission_type = Rdkafka::Bindings.rd_kafka_AclBinding_permission_type(matching_acl)
end

Instance Attribute Details

#error_stringObject (readonly)

Returns the value of attribute error_string.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def error_string
  @error_string
end

#matching_acl_hostObject (readonly)

Returns the value of attribute matching_acl_host.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_host
  @matching_acl_host
end

#matching_acl_operationObject (readonly)

Returns the value of attribute matching_acl_operation.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_operation
  @matching_acl_operation
end

#matching_acl_permission_typeObject (readonly)

Returns the value of attribute matching_acl_permission_type.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_permission_type
  @matching_acl_permission_type
end

#matching_acl_principalObject (readonly)

Returns the value of attribute matching_acl_principal.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_principal
  @matching_acl_principal
end

#matching_acl_resource_nameObject (readonly)

Returns the value of attribute matching_acl_resource_name.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_resource_name
  @matching_acl_resource_name
end

#matching_acl_resource_pattern_typeObject (readonly) Also known as: matching_acl_pattern_type

Returns the value of attribute matching_acl_resource_pattern_type.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_resource_pattern_type
  @matching_acl_resource_pattern_type
end

#matching_acl_resource_typeObject (readonly)

Returns the value of attribute matching_acl_resource_type.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def matching_acl_resource_type
  @matching_acl_resource_type
end

#result_errorObject (readonly)

Returns the value of attribute result_error.



7
8
9
# File 'lib/rdkafka/admin/acl_binding_result.rb', line 7

def result_error
  @result_error
end