Class: KafkaCommand::ConsumerGroupPartition
- Inherits:
-
Object
- Object
- KafkaCommand::ConsumerGroupPartition
- Defined in:
- app/models/kafka_command/consumer_group_partition.rb
Instance Attribute Summary collapse
-
#group_id ⇒ Object
readonly
Returns the value of attribute group_id.
-
#lag ⇒ Object
readonly
Returns the value of attribute lag.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#partition_id ⇒ Object
readonly
Returns the value of attribute partition_id.
-
#topic_name ⇒ Object
readonly
Returns the value of attribute topic_name.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(lag:, topic_name:, offset:, group_id:, partition_id:) ⇒ ConsumerGroupPartition
constructor
A new instance of ConsumerGroupPartition.
Constructor Details
#initialize(lag:, topic_name:, offset:, group_id:, partition_id:) ⇒ ConsumerGroupPartition
Returns a new instance of ConsumerGroupPartition.
7 8 9 10 11 12 13 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 7 def initialize(lag:, topic_name:, offset:, group_id:, partition_id:) @group_id = group_id @lag = lag @topic_name = topic_name @offset = offset @partition_id = partition_id end |
Instance Attribute Details
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
5 6 7 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 5 def group_id @group_id end |
#lag ⇒ Object (readonly)
Returns the value of attribute lag.
5 6 7 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 5 def lag @lag end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
5 6 7 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 5 def offset @offset end |
#partition_id ⇒ Object (readonly)
Returns the value of attribute partition_id.
5 6 7 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 5 def partition_id @partition_id end |
#topic_name ⇒ Object (readonly)
Returns the value of attribute topic_name.
5 6 7 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 5 def topic_name @topic_name end |
Instance Method Details
#as_json ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/models/kafka_command/consumer_group_partition.rb', line 15 def as_json(*) { lag: @lag, offset: @offset, partition_id: @partition_id } end |