OxL Reference

method ClusterApi.findRole

The live nodes that have the role role.

Example:

oxl✓ checked in CI
fn main() io {
  print("{cluster.findRole("store").len()}")
}
Output
1
pub(api) fn findRole(role: str) -> List<ClusterMember>

Complexity. O(n) in the number of nodes.

Since. 1.0.0-beta

Parameters

NameType
rolestr

Returns

List<ClusterMember>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/node.oxl:517

See also