OxL Reference

method ClusterApi.shards

The shard groups of the cluster: database, index, leader, replicas (§12.4, §12.6). Empty outside a cluster.

Example:

oxl✓ checked in CI
fn main() io {
  print("{cluster.shards().len()}")
}
Output
0
pub(api) fn shards() -> List<ShardInfo>

Complexity. O(s) in the number of shard groups.

Since. 1.0.0-beta

Returns

List<ShardInfo>

Effects

none declared (pure unless the body says otherwise)

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

See also