Class: NATS::JetStream::API::SequenceInfo
- Inherits:
-
Struct
- Object
- Struct
- NATS::JetStream::API::SequenceInfo
- Defined in:
- lib/nats/io/js.rb
Overview
SequenceInfo is a pair of consumer and stream sequence and last activity.
Instance Attribute Summary collapse
-
#consumer_seq ⇒ Integer
The consumer sequence.
-
#last_active ⇒ Object
Returns the value of attribute last_active.
-
#stream_seq ⇒ Integer
The stream sequence.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ SequenceInfo
constructor
A new instance of SequenceInfo.
Constructor Details
#initialize(opts = {}) ⇒ SequenceInfo
Returns a new instance of SequenceInfo.
1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/nats/io/js.rb', line 1150 def initialize(opts={}) # Filter unrecognized fields and freeze. rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) freeze end |
Instance Attribute Details
#consumer_seq ⇒ Integer
Returns The consumer sequence.
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/nats/io/js.rb', line 1148 SequenceInfo = Struct.new(:consumer_seq, :stream_seq, :last_active, keyword_init: true) do def initialize(opts={}) # Filter unrecognized fields and freeze. rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) freeze end end |
#last_active ⇒ Object
Returns the value of attribute last_active
1148 1149 1150 |
# File 'lib/nats/io/js.rb', line 1148 def last_active @last_active end |
#stream_seq ⇒ Integer
Returns The stream sequence.
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/nats/io/js.rb', line 1148 SequenceInfo = Struct.new(:consumer_seq, :stream_seq, :last_active, keyword_init: true) do def initialize(opts={}) # Filter unrecognized fields and freeze. rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) freeze end end |