method ClusterApi.findRole
The live nodes that have the role role.
Example:
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
| Name | Type |
|---|---|
role | str |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/node.oxl:517