Method: RabbitMQ::Util.connection_info
- Defined in:
- lib/rabbitmq/util.rb
.connection_info(url = nil, **overrides) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rabbitmq/util.rb', line 36 def connection_info(url=nil, **overrides) info = FFI::ConnectionInfo.new FFI.amqp_default_connection_info(info) result = info.to_h if url url_ptr = Util.strdup_ptr(url) Util.error_check :"parsing connection URL", FFI.amqp_parse_url(url_ptr, info) # We must copy ConnectionInfo before the url_ptr is freed. result.merge!(info.to_h) url_ptr.free end result.merge(overrides) end |