fn nodes
All nodes the membership knows, this one included, with their state ("alive", "suspect", "dead", "left").
Example:
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
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/cluster/cluster.oxl:70