EmqttFailover (EmqttFailover v0.3.1)

Helper functions for supporting EmqttFailover.

Summary

Functions

Generate a unique client ID, like "<prefix>-<hostname>-<random suffix>"

Types

Link to this type

client_id_opt()

@type client_id_opt() :: {:prefix, binary()} | {:hostname, binary()}

Functions

Link to this function

client_id(opts \\ [])

@spec client_id([client_id_opt()]) :: binary()

Generate a unique client ID, like "<prefix>-<hostname>-<random suffix>"

Options:

  • prefix: defaults to "emqtt-f"
  • hostname: defaults to the value of :inet.gethostname()