Helpers for ArtPoll discovery configuration and reply-on-change logic.
Provides pure functions for normalizing discovery settings and managing purely functional reply-on-change subscriber state.
Helpers for ArtPoll discovery configuration and reply-on-change logic. Provides pure functions for normalizing discovery settings and managing purely functional reply-on-change subscriber state.
(disable-reply-on-change entry)Disables reply-on-change tracking for a peer entry.
Disables reply-on-change tracking for a peer entry.
(enforce-reply-on-change-limit state)Enforces the limit on reply-on-change subscribers.
Returns updated state with excess subscribers disabled based on policy. Uses :discovery {:reply-on-change-limit N :reply-on-change-policy ...}.
Enforces the limit on reply-on-change subscribers.
Returns updated state with excess subscribers disabled based on policy.
Uses :discovery {:reply-on-change-limit N :reply-on-change-policy ...}.(normalize-config discovery)Normalizes discovery configuration to canonical form.
Ensures :reply-on-change-limit is non-negative and :reply-on-change-policy is valid (defaults to :prefer-existing).
Normalizes discovery configuration to canonical form. Ensures :reply-on-change-limit is non-negative and :reply-on-change-policy is valid (defaults to :prefer-existing).
(page-in-target-range? page
target-enabled?
target-bottom
target-top
page-port-addresses-fn)Checks if a page has any port addresses within the targeted range.
Returns true if:
Checks if a page has any port addresses within the targeted range. Returns true if: - Targeted mode is disabled (pass-through) - Page has port addresses within [target-bottom, target-top]
(peer-key {:keys [host port]})Creates consistent peer lookup key from sender info (host and port).
Creates consistent peer lookup key from sender info (host and port).
(reply-on-change-effects state reply-data exclude-key)Generates tx-packet effects for all reply-on-change peers.
Used when node state changes (e.g., address change, name change).
Generates tx-packet effects for all reply-on-change peers. Used when node state changes (e.g., address change, name change).
(reply-on-change-peers state exclude-key)Gets a list of peers subscribed to reply-on-change, excluding a specific peer.
Gets a list of peers subscribed to reply-on-change, excluding a specific peer.
(reply-on-change-peers-for-page state page exclude-key page-port-addresses-fn)Gets reply-on-change peers whose targeted mode matches the given page's addresses.
If a peer uses targeted mode, only returns it if the page has addresses in range. If a peer doesn't use the targeted mode, always returns it.
Gets reply-on-change peers whose targeted mode matches the given page's addresses. If a peer uses targeted mode, only returns it if the page has addresses in range. If a peer doesn't use the targeted mode, always returns it.
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 |