Method: Natsy::Config::Options#urls

Defined in:
lib/natsy/config.rb

#urlsObject

Specify a NATS server URL (or multiple URLs)

NOTE: The following two examples do exactly the same thing.

NOTE: The following two examples do exactly the same thing.

If left blank/omitted, natsy will fall back on the default URL, which is nats://localhost:4222.

Examples:

Natsy::Config.set(url: "nats://foo.bar:4567"))
Natsy::Config.set do |options|
  options.url = "nats://foo.bar:4567"
end
Natsy::Config.set(urls: ["nats://foo.bar:4567", "nats://foo.bar:5678"])
Natsy::Config.set do |options|
  options.urls = ["nats://foo.bar:4567", "nats://foo.bar:5678"]
end


43
44
45
# File 'lib/natsy/config.rb', line 43

def urls
  @urls
end