Connection tracking management for the load balancer. Provides utilities for monitoring, cleaning, and querying connection state.
Connection tracking management for the load balancer. Provides utilities for monitoring, cleaning, and querying connection state.
(aggregate-stats conntrack-map)Aggregate statistics across all connections.
Aggregate statistics across all connections.
(cleanup-stale-connections! conntrack-map timeout-seconds)Remove connections older than the timeout.
Returns the number of connections removed.
Remove connections older than the timeout. Returns the number of connections removed.
(clear-all-connections! conntrack-map)Remove all connections from the tracking map.
Returns the number of connections removed.
Remove all connections from the tracking map. Returns the number of connections removed.
(connection->map conn)Convert a Connection to a human-readable map.
Convert a Connection to a human-readable map.
(connection-age-ns conn current-time-ns)Get the age of a connection in nanoseconds. Returns nil if created-ns is 0 (not set).
Get the age of a connection in nanoseconds. Returns nil if created-ns is 0 (not set).
(connection-age-seconds conn current-time-ns)Get the age of a connection in seconds.
Get the age of a connection in seconds.
(connection-expired? conn current-time-ns timeout-ns)Check if a connection has expired based on idle timeout.
Check if a connection has expired based on idle timeout.
(connection-idle-ns conn current-time-ns)Get the idle time of a connection in nanoseconds (time since last packet).
Get the idle time of a connection in nanoseconds (time since last packet).
(connection-idle-seconds conn current-time-ns)Get the idle time of a connection in seconds.
Get the idle time of a connection in seconds.
(count-connections conntrack-map)Get the number of active connections.
Get the number of active connections.
(format-connection conn)(format-connection conn current-time-ns)Format a connection for display.
Format a connection for display.
(format-duration seconds)Format a duration in seconds to a human-readable string.
Format a duration in seconds to a human-readable string.
(get-all-connections conntrack-map)Get all active connections as Connection records.
Get all active connections as Connection records.
(get-connection conntrack-map
{:keys [src-ip dst-ip src-port dst-port protocol]})Get a specific connection by 5-tuple.
Get a specific connection by 5-tuple.
(get-connections-by-source conntrack-map src-ip)Get all connections from a specific source IP.
Get all connections from a specific source IP.
(get-connections-by-target conntrack-map target-ip)Get all connections to a specific NAT target.
Get all connections to a specific NAT target.
(get-stale-connections conntrack-map current-time-ns timeout-ns)Get connections that haven't been seen within the timeout period.
Get connections that haven't been seen within the timeout period.
(print-connection-stats conntrack-map)Print aggregated connection statistics.
Print aggregated connection statistics.
(print-connections conntrack-map)Print all connections to stdout.
Print all connections to stdout.
(raw-entry->connection {:keys [key value]})Convert raw map entry to Connection record.
Convert raw map entry to Connection record.
(start-cleanup-daemon conntrack-map
settings-map
&
{:keys [interval-seconds] :or {interval-seconds 60}})Start a background daemon that periodically cleans up stale connections.
Returns a control map with :stop-fn to stop the daemon.
Start a background daemon that periodically cleans up stale connections. Returns a control map with :stop-fn to stop the daemon.
(stats-by-protocol conntrack-map)Aggregate statistics grouped by protocol.
Aggregate statistics grouped by protocol.
(stats-by-source conntrack-map)Aggregate statistics grouped by source IP.
Aggregate statistics grouped by source IP.
(stats-by-target conntrack-map)Aggregate statistics grouped by NAT target.
Aggregate statistics grouped by NAT target.
(stop-cleanup-daemon {:keys [stop-fn]})Stop the cleanup daemon.
Stop the cleanup daemon.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |