Class: Kafka::FFI::GroupInfo

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/kafka/ffi/group_info.rb

Instance Method Summary collapse

Instance Method Details

#brokerKafka::FFI::BrokerMetadata

Returns information about the broker that originated the group info.

Returns:



23
24
25
# File 'lib/kafka/ffi/group_info.rb', line 23

def broker
  self[:broker]
end

#errornil, Kafka::ResponseError

Returns any broker orignated error for the consumer group.

Returns:



39
40
41
42
43
# File 'lib/kafka/ffi/group_info.rb', line 39

def error
  if self[:err] != :ok
    ::Kafka::ResponseError.new(self[:err])
  end
end

#groupString Also known as: name

Returns the name of the group

Returns:

  • (String)

    Group name



30
31
32
# File 'lib/kafka/ffi/group_info.rb', line 30

def group
  self[:group]
end

#membersArray<GroupMemberInfo>

Returns information about the members of the consumer group

Returns:



69
70
71
72
73
# File 'lib/kafka/ffi/group_info.rb', line 69

def members
  self[:member_cnt].times.map do |i|
    GroupMemberInfo.new(self[:members] + (i * GroupMemberInfo.size))
  end
end

#protocolString

Returns the group protocol

Returns:

  • (String)

    Group protocol



62
63
64
# File 'lib/kafka/ffi/group_info.rb', line 62

def protocol
  self[:protocol]
end

#protocol_typeString

Returns the group protocol type

Returns:

  • (String)

    Group protocol type



55
56
57
# File 'lib/kafka/ffi/group_info.rb', line 55

def protocol_type
  self[:protocol_type]
end

#stateString

Returns the current state of the group

Returns:

  • (String)

    Group state



48
49
50
# File 'lib/kafka/ffi/group_info.rb', line 48

def state
  self[:state]
end