You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb7a12b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: lib/gnat/connection_supervisor.ex
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ defmodule Gnat.ConnectionSupervisor do
19
19
}
20
20
```
21
21
22
-
The connection settings can specify all of the same values that you pass to `Gnat.start_link/1`. Each time a connection is attempted we will use one of the provided connection settings to open the connection. This is a simplistic way of load balancing your connections across a cluster of nats nodes and allowing failover to other nodes in the cluster if one goes down.
22
+
The connection settings can specify all of the same values that you pass to `Gnat.start_link/1`. Their secrets are redacted from this process's status and crash reports. Each time a connection is attempted we will use one of the provided connection settings to open the connection. This is a simplistic way of load balancing your connections across a cluster of nats nodes and allowing failover to other nodes in the cluster if one goes down.
23
23
24
24
To use this in your supervision tree add an entry like this:
25
25
@@ -58,7 +58,7 @@ defmodule Gnat.ConnectionSupervisor do
58
58
@implGenServer
59
59
defhandle_info(:attempt_connection,state)do
60
60
connection_config=random_connection_config(state)
61
-
Logger.debug("connecting to #{inspect(connection_config)}")
61
+
Logger.debug("connecting to #{inspect(Gnat.Handshake.redact_settings(connection_config))}")
0 commit comments