OxL Reference

enum PickBy

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

Example:

oxl✓ checked in CI
fn main() io {
  let by: PickBy = .First
  match cluster.pick("Bank", by: by) {
    ClusterMember _ => print("found")
    none => print("none")
  }
}
Output
none
@derive(Copy)
pub(api) enum PickBy

Since. 1.0.0-beta

Variants

LeastLoad

The node with the lowest reported load.

First

The first node found.

Defined in: std/core/node.oxl:591

See also