View Source mqtt_sessions_registry (mqtt_sessions v2.5.1)
Link to this section Summary
Functions
Generate a new (random) ClientID of 20 bytes. A ClientID may be 1 to 23 utf8 encoded bytes.
Find the session process for the given pool name and client.
Force a session to close, no DISCONNECT to be sent.
Register a session with the registry, called by the session.
Generate a new (random) RoutingId of 22 bytes. A ClientID may be 1 to 23 utf8 encoded bytes.
Find the name and pool for the session process
Link to this section Functions
-spec client_id(atom()) -> binary().
-spec find_session(atom(), binary() | pid()) -> {ok, pid()} | {error, notfound}.
-spec init([]) -> {ok, #state{}}.
-spec kill_session(atom(), binary()) -> ok.
-spec register(atom(), binary(), pid()) -> ok | {error, duplicate}.
-spec routing_id(atom()) -> binary().
-spec start_link() -> {ok, pid()} | {error, term()}.
-spec whois(pid()) -> {ok, {atom(), binary()}} | {error, notfound}.