Class: Kafka::FFI::GroupInfo
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Kafka::FFI::GroupInfo
- Defined in:
- lib/kafka/ffi/group_info.rb
Instance Method Summary collapse
-
#broker ⇒ Kafka::FFI::BrokerMetadata
Returns information about the broker that originated the group info.
-
#error ⇒ nil, Kafka::ResponseError
Returns any broker orignated error for the consumer group.
-
#group ⇒ String
(also: #name)
Returns the name of the group.
-
#members ⇒ Array<GroupMemberInfo>
Returns information about the members of the consumer group.
-
#protocol ⇒ String
Returns the group protocol.
-
#protocol_type ⇒ String
Returns the group protocol type.
-
#state ⇒ String
Returns the current state of the group.
Instance Method Details
#broker ⇒ Kafka::FFI::BrokerMetadata
Returns information about the broker that originated the group info.
23 24 25 |
# File 'lib/kafka/ffi/group_info.rb', line 23 def broker self[:broker] end |
#error ⇒ nil, Kafka::ResponseError
Returns any broker orignated error for the consumer group.
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 |
#group ⇒ String Also known as: name
Returns the name of the group
30 31 32 |
# File 'lib/kafka/ffi/group_info.rb', line 30 def group self[:group] end |
#members ⇒ Array<GroupMemberInfo>
Returns information about the members of the consumer group
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 |
#protocol ⇒ String
Returns the group protocol
62 63 64 |
# File 'lib/kafka/ffi/group_info.rb', line 62 def protocol self[:protocol] end |
#protocol_type ⇒ String
Returns the group protocol type
55 56 57 |
# File 'lib/kafka/ffi/group_info.rb', line 55 def protocol_type self[:protocol_type] end |
#state ⇒ String
Returns the current state of the group
48 49 50 |
# File 'lib/kafka/ffi/group_info.rb', line 48 def state self[:state] end |