Class: NATS::JetStream::API::StreamCreateResponse
- Inherits:
-
Struct
- Object
- Struct
- NATS::JetStream::API::StreamCreateResponse
- Defined in:
- lib/nats/io/jetstream/api.rb
Overview
StreamCreateResponse is the response from the JetStream $JS.API.STREAM.CREATE API.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ StreamCreateResponse
constructor
A new instance of StreamCreateResponse.
Constructor Details
#initialize(opts = {}) ⇒ StreamCreateResponse
Returns a new instance of StreamCreateResponse.
271 272 273 274 275 276 277 278 |
# File 'lib/nats/io/jetstream/api.rb', line 271 def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end |
Instance Attribute Details
#config ⇒ StreamConfig
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/nats/io/jetstream/api.rb', line 269 StreamCreateResponse = Struct.new(:type, :config, :created, :state, :did_create, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end end |
#created ⇒ String
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/nats/io/jetstream/api.rb', line 269 StreamCreateResponse = Struct.new(:type, :config, :created, :state, :did_create, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end end |
#did_create ⇒ Boolean
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/nats/io/jetstream/api.rb', line 269 StreamCreateResponse = Struct.new(:type, :config, :created, :state, :did_create, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end end |
#state ⇒ StreamState
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/nats/io/jetstream/api.rb', line 269 StreamCreateResponse = Struct.new(:type, :config, :created, :state, :did_create, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end end |
#type ⇒ String
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/nats/io/jetstream/api.rb', line 269 StreamCreateResponse = Struct.new(:type, :config, :created, :state, :did_create, keyword_init: true) do def initialize(opts={}) rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } opts[:config] = StreamConfig.new(opts[:config]) opts[:state] = StreamState.new(opts[:state]) super(opts) freeze end end |