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

enum PickBy

How cluster.pick chooses among the nodes that serve a service.

Example:

oxl✓ проверяется в CI
fn main() io {
  let by: PickBy = .First
  match cluster.pick("Bank", by: by) {
    ClusterMember _ => print("found")
    none => print("none")
  }
}
Вывод
none
@derive(Copy)
pub(api) enum PickBy

С версии. 1.0.0-beta

Варианты

LeastLoad

The node with the lowest reported load.

First

The first node found.

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

См. также