freddy v0.10.2 Freddy.Conn

RabbitMQ connection establisher

Link to this section Summary

Link to this section Types

Link to this type config()
config() :: [config_option]
Link to this type config_option()
config_option ::
  {:adapter, atom} |
  {:backoff, [non_neg_integer]} |
  {:history, GenServer.server} |
  {:host, binary} |
  {:port, pos_integer} |
  {:username, binary} |
  {:password, binary} |
  {:virtual_host, binary} |
  {:channel_max, non_neg_integer} |
  {:frame_max, non_neg_integer} |
  {:heartbeat, non_neg_integer} |
  {:connection_timeout, timeout} |
  {:ssl_options, Keyword.t | :none} |
  {:client_properties, list} |
  {:socket_options, list}

Link to this section Functions

Link to this function start_link(config \\ [], opts \\ [])

Starts a Hare.Core.Conn process linked to the current process.

It receives two arguments:

  • config - Connection configuration. See Freddy.Conn.config_option type for available options.
  • opts - GenServer options. See GenServer.start_link/3 for more information.

This function is used to start a Hare.Core.Conn on a supervision tree, and behaves like a GenServer.

Link to this function stop(conn, reason \\ :normal)