variable / @typed/fx/RefHashRing

get

Get the node which should handle a given input string as a Filtered. Fails if the ring is empty.

Package version
2.0.0-beta.13
Category
Optional queries
Since
1.18.0

Import

import { get } from "@typed/fx/RefHashRing";

Signatures

export declare const get: {
    (input: string): <A extends PrimaryKey.PrimaryKey, E, R>(ref: RefHashRing<A, E, R>) => RefSubject.Filtered<A, E, R>;
    <A extends PrimaryKey.PrimaryKey, E, R>(ref: RefHashRing<A, E, R>, input: string): RefSubject.Filtered<A, E, R>;
};

Why

Models the possibly absent result of get as Filtered state, so absence stays explicit while later source versions can make a value available.

Ownership and lifetime

The get view retains no independent value. Its Effect read fails with NoSuchElement while absent; the observing Scope owns and finalizes its Fx subscription.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source