OxL Справочник OxL
РусскийEnglish

method ClusterApi.findRole

The live nodes that have the role role.

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
rolestr

Возвращает

List<ClusterMember>

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/node.oxl:517

См. также