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

fn nodes

All nodes the membership knows, this one included, with their state ("alive", "suspect", "dead", "left").

Example:

oxl✓ проверяется в CI
use std.cluster

fn main() io {
  for m in cluster.nodes() {
    print("{m.state} {m.isSelf}")
  }
}
Вывод
alive true
pub(api) fn nodes() -> List<ClusterMember>

Сложность. O(n) in the number of nodes.

С версии. 1.0.0-beta

Возвращает

List<ClusterMember>

Эффекты

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

Определено в: std/cluster/cluster.oxl:70

См. также