variable / @typed/fx/RefHashRing

add

Add a node to the HashRing.

Package version
2.0.0-beta.13
Category
State updates
Since
1.18.0

Import

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

Signatures

export declare const add: {
    <A extends PrimaryKey.PrimaryKey>(node: A, options?: {
        readonly weight?: number;
    }): <E, R>(ref: RefHashRing<A, E, R>) => Effect.Effect<HashRing.HashRing<A>, E, R>;
    <A extends PrimaryKey.PrimaryKey, E, R>(ref: RefHashRing<A, E, R>, node: A, options?: {
        readonly weight?: number;
    }): Effect.Effect<HashRing.HashRing<A>, E, R>;
};

Why

Add a node to the HashRing. The operation remains attached to the RefSubject’s versioned state boundary.

Ownership and lifetime

Running add performs one serialized hash ring transition and resolves with its committed value. It acquires no resource; failures and services remain those of the source ref.

Other public imports

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

Source