Class: NATS::JetStream::API::StreamState
- Inherits:
-
Struct
- Object
- Struct
- NATS::JetStream::API::StreamState
- Defined in:
- lib/nats/io/jetstream/api.rb
Overview
StreamState is the state of a stream.
Instance Attribute Summary collapse
- #bytes ⇒ Integer
- #consumer_count ⇒ Integer
- #first_seq ⇒ Integer
-
#first_ts ⇒ Object
Returns the value of attribute first_ts.
- #last_seq ⇒ Integer
-
#last_ts ⇒ Object
Returns the value of attribute last_ts.
- #messages ⇒ Integer
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ StreamState
constructor
A new instance of StreamState.
Constructor Details
#initialize(opts = {}) ⇒ StreamState
Returns a new instance of StreamState.
250 251 252 253 254 |
# File 'lib/nats/io/jetstream/api.rb', line 250 def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end |
Instance Attribute Details
#bytes ⇒ Integer
247 248 249 250 251 252 253 254 255 |
# File 'lib/nats/io/jetstream/api.rb', line 247 StreamState = Struct.new(:messages, :bytes, :first_seq, :first_ts, :last_seq, :last_ts, :consumer_count, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end end |
#consumer_count ⇒ Integer
247 248 249 250 251 252 253 254 255 |
# File 'lib/nats/io/jetstream/api.rb', line 247 StreamState = Struct.new(:messages, :bytes, :first_seq, :first_ts, :last_seq, :last_ts, :consumer_count, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end end |
#first_seq ⇒ Integer
247 248 249 250 251 252 253 254 255 |
# File 'lib/nats/io/jetstream/api.rb', line 247 StreamState = Struct.new(:messages, :bytes, :first_seq, :first_ts, :last_seq, :last_ts, :consumer_count, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end end |
#first_ts ⇒ Object
Returns the value of attribute first_ts
247 248 249 |
# File 'lib/nats/io/jetstream/api.rb', line 247 def first_ts @first_ts end |
#last_seq ⇒ Integer
247 248 249 250 251 252 253 254 255 |
# File 'lib/nats/io/jetstream/api.rb', line 247 StreamState = Struct.new(:messages, :bytes, :first_seq, :first_ts, :last_seq, :last_ts, :consumer_count, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end end |
#last_ts ⇒ Object
Returns the value of attribute last_ts
247 248 249 |
# File 'lib/nats/io/jetstream/api.rb', line 247 def last_ts @last_ts end |
#messages ⇒ Integer
247 248 249 250 251 252 253 254 255 |
# File 'lib/nats/io/jetstream/api.rb', line 247 StreamState = Struct.new(:messages, :bytes, :first_seq, :first_ts, :last_seq, :last_ts, :consumer_count, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } super(opts) end end |