method ClusterApi.findRole
The live nodes that have the role role.
Example:
fn main() io {
print("{cluster.findRole("store").len()}")
}Вывод
1
pub(api) fn findRole(role: str) -> List<ClusterMember>Сложность. O(n) in the number of nodes.
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
role | str |
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/node.oxl:517