Class: NATS::KeyValue::BucketStatus
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.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.
20 21 22 23 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.rb', line 20 def initialize(info, bucket) @nfo = info @bucket = bucket end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
18 19 20 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.rb', line 18 def bucket @bucket end |
Instance Method Details
#history ⇒ Object
29 30 31 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.rb', line 29 def history @nfo.config.max_msgs_per_subject end |
#ttl ⇒ Object
33 34 35 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.rb', line 33 def ttl @nfo.config.max_age / ::NATS::NANOSECONDS end |
#values ⇒ Object
25 26 27 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/kv/bucket_status.rb', line 25 def values @nfo.state. end |