effect-io-ai

Package: effect
Module: HashRing

HashRing.getShards

Computes a balanced shard distribution across the nodes in the ring.

When to use

Use to precompute ownership for a fixed number of shard indexes across the current ring members.

Signature

declare const getShards: <A extends PrimaryKey.PrimaryKey>(self: HashRing<A>, count: number) => Array<A> | undefined

Source

Since v3.19.0