Class: Kafka::FFI::Admin::TopicResult

Inherits:
OpaquePointer show all
Defined in:
lib/kafka/ffi/admin/topic_result.rb

Instance Attribute Summary

Attributes inherited from OpaquePointer

#pointer

Instance Method Summary collapse

Methods inherited from OpaquePointer

by_ref, from_native, inherited, #initialize, to_native

Constructor Details

This class inherits a constructor from Kafka::FFI::OpaquePointer

Instance Method Details

#errornil, Kafka::ResponseError

Returns either nil for success or an error with details about why the topic operation failed.

Returns:

  • (nil)

    Topic operation was successful for this topic.

  • (Kafka::ResponseError)

    Error performing the operation for this topic.



22
23
24
25
26
27
28
29
30
# File 'lib/kafka/ffi/admin/topic_result.rb', line 22

def error
  err = ::Kafka::FFI.rd_kafka_topic_result_error(self)
  if err != :ok
    ::Kafka::ResponseError.new(
      err,
      ::Kafka::FFI.rd_kafka_topic_result_error_string(self),
    )
  end
end

#nameString Also known as: topic

Returns the name of the topic the result is for.

Returns:

  • (String)

    Topic name



11
12
13
# File 'lib/kafka/ffi/admin/topic_result.rb', line 11

def name
  ::Kafka::FFI.rd_kafka_topic_result_name(self)
end