method ClusterApi.shards
The shard groups of the cluster: database, index, leader, replicas (§12.4, §12.6). Empty outside a cluster.
Example:
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
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/node.oxl:384