Class: NatsWorker::Configuration
- Inherits:
-
Object
- Object
- NatsWorker::Configuration
- Defined in:
- lib/nats_worker/configuration.rb
Instance Attribute Summary collapse
-
#default_ack_wait ⇒ Object
Returns the value of attribute default_ack_wait.
-
#default_fetch_size ⇒ Object
Returns the value of attribute default_fetch_size.
-
#default_fetch_timeout ⇒ Object
Returns the value of attribute default_fetch_timeout.
-
#default_threads ⇒ Object
Returns the value of attribute default_threads.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#nats_options ⇒ Object
Returns the value of attribute nats_options.
-
#servers ⇒ Object
Returns the value of attribute servers.
-
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/nats_worker/configuration.rb', line 10 def initialize @servers = ENV.fetch("NATS_URL", "nats://127.0.0.1:4222").split(",") @nats_options = {} @logger = Logger.new($stdout) @logger.level = Logger::INFO @default_fetch_size = 10 @default_fetch_timeout = 5 @default_threads = 1 @default_ack_wait = 30 @shutdown_timeout = 25 end |
Instance Attribute Details
#default_ack_wait ⇒ Object
Returns the value of attribute default_ack_wait.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def default_ack_wait @default_ack_wait end |
#default_fetch_size ⇒ Object
Returns the value of attribute default_fetch_size.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def default_fetch_size @default_fetch_size end |
#default_fetch_timeout ⇒ Object
Returns the value of attribute default_fetch_timeout.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def default_fetch_timeout @default_fetch_timeout end |
#default_threads ⇒ Object
Returns the value of attribute default_threads.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def default_threads @default_threads end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def logger @logger end |
#nats_options ⇒ Object
Returns the value of attribute nats_options.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def @nats_options end |
#servers ⇒ Object
Returns the value of attribute servers.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def servers @servers end |
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
5 6 7 |
# File 'lib/nats_worker/configuration.rb', line 5 def shutdown_timeout @shutdown_timeout end |