macula_console (macula v0.20.5)
View SourceMacula Console Formatter - Beautiful colored terminal output.
Provides ANSI-colored output for ping-pong demo and general logging. Makes demo output visually appealing and easy to read.
Example output:
--> fc01 -> rc05 [full_cone -> restricted]
<-- fc01 <- rc05 42ms [restricted]
[!!] fc01 -> sy07 TIMEOUT [symmetric]
Summary
Functions
Display a startup banner for the node
Output an error message: [!!] Error message
Output an info message: [i] Info message
Output a node connected event: [*] Node fc01 connected (full_cone)
Output a node disconnected event: [*] Node fc01 disconnected
Output a PING message showing source to target with NAT types
Output a PONG message with RTT
Output a PubSub receive message with delivery rate
Output a PubSub broadcast message with sequence number
Output statistics for a node StatsMap should contain: pings_sent, pongs_received, timeouts, avg_rtt_ms
Output a success message: [ok] Success message
Output a TIMEOUT message for a failed ping
Output a warning message: [!] Warning message
Functions
-spec banner(map()) -> ok.
Display a startup banner for the node
Output an error message: [!!] Error message
Output an info message: [i] Info message
Output a node connected event: [*] Node fc01 connected (full_cone)
Output a node disconnected event: [*] Node fc01 disconnected
-spec ping(binary() | string(), binary() | string(), binary() | string() | atom(), binary() | string() | atom()) -> ok.
Output a PING message showing source to target with NAT types
-spec pong(binary() | string(), binary() | string(), integer(), binary() | string() | atom()) -> ok.
Output a PONG message with RTT
-spec pubsub_recv(binary() | string(), binary() | string(), integer(), binary() | string() | atom(), float()) -> ok.
Output a PubSub receive message with delivery rate
Output a PubSub broadcast message with sequence number
Output statistics for a node StatsMap should contain: pings_sent, pongs_received, timeouts, avg_rtt_ms
Output a success message: [ok] Success message
Output a TIMEOUT message for a failed ping
Output a warning message: [!] Warning message