RpcLoadBalancer.NodeFilter (rpc_load_balancer v0.3.4)

Copy Markdown View Source

Node-name matching for filter-based routing and load-balancer membership.

A node matches a filter when the filter is a substring of (or regex against) the node name, EXCEPT when the node's short name carries a configured excluded pattern that the filter itself does not. This keeps a class of nodes — e.g. QA nodes named <type>_qa@host — out of the general <type> routing set, while a <type>_qa filter can still reach them.

Exclusions default to [] (no behavior change). Configure them with:

config :rpc_load_balancer, excluded_node_patterns: ["_qa"]

Summary

Functions

matches?(node_name, filter, excluded_patterns \\ RpcLoadBalancer.Config.excluded_node_patterns())

@spec matches?(node() | String.t(), String.t() | Regex.t(), [String.t()]) :: boolean()