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

fn node

The id of the node called name. On a single node every other id is unreachable: Service.at(cluster.node(x)) is Unavailable.

Example:

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

fn main() io {
  let id = cluster.node("store-2")
  print(id.name)
}
Вывод
store-2
pub(api) fn node(name: str) -> NodeId

С версии. 1.0.0-beta

Параметры

ИмяТип
namestr

Возвращает

NodeId

Эффекты

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

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

См. также