effect-io-ai

Package: effect
Module: HashRing

HashRing.has

Checks whether the ring contains a node with the same PrimaryKey value.

When to use

Use when you need to know whether registering a node would update an existing ring member because another node already has the same primary-key identity.

Details

Membership is checked with self.nodes.has(PrimaryKey.value(node)), so matching is by primary key, not object identity or weight.

See

Signature

declare const has: { <A extends PrimaryKey.PrimaryKey>(node: A): (self: HashRing<A>) => boolean; <A extends PrimaryKey.PrimaryKey>(self: HashRing<A>, node: A): boolean; }

Source

Since v3.19.0