Class: NATS::KeyValue::BucketStatus
- Inherits:
-
Object
- Object
- NATS::KeyValue::BucketStatus
- Defined in:
- lib/nats/io/kv.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
Instance Method Summary collapse
- #history ⇒ Object
-
#initialize(info, bucket) ⇒ BucketStatus
constructor
A new instance of BucketStatus.
- #ttl ⇒ Object
- #values ⇒ Object
Constructor Details
#initialize(info, bucket) ⇒ BucketStatus
Returns a new instance of BucketStatus.
218 219 220 221 |
# File 'lib/nats/io/kv.rb', line 218 def initialize(info, bucket) @nfo = info @bucket = bucket end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
216 217 218 |
# File 'lib/nats/io/kv.rb', line 216 def bucket @bucket end |
Instance Method Details
#history ⇒ Object
227 228 229 |
# File 'lib/nats/io/kv.rb', line 227 def history @nfo.config.max_msgs_per_subject end |
#ttl ⇒ Object
231 232 233 |
# File 'lib/nats/io/kv.rb', line 231 def ttl @nfo.config.max_age / ::NATS::NANOSECONDS end |
#values ⇒ Object
223 224 225 |
# File 'lib/nats/io/kv.rb', line 223 def values @nfo.state. end |