Parses connection URLs.
fire://user:password@host:5673/vhostThe schemes are fire (TCP, port 5673), fires (TLS, port 5674), ws (port 15672)
and wss (port 15671). User and password default to guest. For fire and fires
the vhost is the path without its leading /, percent-decoded; an empty path means
vhost /. For ws and wss the path is the WebSocket endpoint (/fire when empty)
and the vhost is the vhost query parameter.
This client connects over fire and fires. WebSocket URLs parse, but FireMQ.connect/2
rejects them.
Summary
Functions
Parses a URL and fills in the defaults.
Types
Functions
@spec parse(String.t()) :: {:ok, t()} | {:error, FireMQ.Error.t()}
Parses a URL and fills in the defaults.
iex> {:ok, url} = FireMQ.URL.parse("fire://localhost")
iex> {url.transport, url.port, url.vhost, url.user}
{:tcp, 5673, "/", "guest"}