Liking cljdoc? Tell your friends :D

lb.conntrack

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.
raw docstring

aggregate-statsclj

(aggregate-stats conntrack-map)

Aggregate statistics across all connections.

Aggregate statistics across all connections.
sourceraw docstring

cleanup-stale-connections!clj

(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.
sourceraw docstring

clear-all-connections!clj

(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.
sourceraw docstring

connection->mapclj

(connection->map conn)

Convert a Connection to a human-readable map.

Convert a Connection to a human-readable map.
sourceraw docstring

connection-age-nsclj

(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).
sourceraw docstring

connection-age-secondsclj

(connection-age-seconds conn current-time-ns)

Get the age of a connection in seconds.

Get the age of a connection in seconds.
sourceraw docstring

connection-expired?clj

(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.
sourceraw docstring

connection-idle-nsclj

(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).
sourceraw docstring

connection-idle-secondsclj

(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.
sourceraw docstring

count-connectionsclj

(count-connections conntrack-map)

Get the number of active connections.

Get the number of active connections.
sourceraw docstring

format-connectionclj

(format-connection conn)
(format-connection conn current-time-ns)

Format a connection for display.

Format a connection for display.
sourceraw docstring

format-durationclj

(format-duration seconds)

Format a duration in seconds to a human-readable string.

Format a duration in seconds to a human-readable string.
sourceraw docstring

get-all-connectionsclj

(get-all-connections conntrack-map)

Get all active connections as Connection records.

Get all active connections as Connection records.
sourceraw docstring

get-connectionclj

(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.
sourceraw docstring

get-connections-by-sourceclj

(get-connections-by-source conntrack-map src-ip)

Get all connections from a specific source IP.

Get all connections from a specific source IP.
sourceraw docstring

get-connections-by-targetclj

(get-connections-by-target conntrack-map target-ip)

Get all connections to a specific NAT target.

Get all connections to a specific NAT target.
sourceraw docstring

get-stale-connectionsclj

(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.
sourceraw docstring

(print-connection-stats conntrack-map)

Print aggregated connection statistics.

Print aggregated connection statistics.
sourceraw docstring

(print-connections conntrack-map)

Print all connections to stdout.

Print all connections to stdout.
sourceraw docstring

raw-entry->connectionclj

(raw-entry->connection {:keys [key value]})

Convert raw map entry to Connection record.

Convert raw map entry to Connection record.
sourceraw docstring

start-cleanup-daemonclj

(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.
sourceraw docstring

stats-by-protocolclj

(stats-by-protocol conntrack-map)

Aggregate statistics grouped by protocol.

Aggregate statistics grouped by protocol.
sourceraw docstring

stats-by-sourceclj

(stats-by-source conntrack-map)

Aggregate statistics grouped by source IP.

Aggregate statistics grouped by source IP.
sourceraw docstring

stats-by-targetclj

(stats-by-target conntrack-map)

Aggregate statistics grouped by NAT target.

Aggregate statistics grouped by NAT target.
sourceraw docstring

stop-cleanup-daemonclj

(stop-cleanup-daemon {:keys [stop-fn]})

Stop the cleanup daemon.

Stop the cleanup daemon.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close