Skip to content

SingletonAddress.ts

The SingletonAddress module models the runtime address assigned to a cluster singleton registration. The address pairs the singleton name with the ShardId selected from that name and its shard group, giving sharding one stable value for registration events, equality, hashing, and local singleton fiber tracking.

Since v4.0.0



Represents the unique address of an singleton within the cluster.

Signature

declare class SingletonAddress

Source

Since v4.0.0

Computes a structural hash from the singleton name and shard id.

Signature

declare const [Hash.symbol]: () => number

Source

Since v4.0.0

Compares singleton addresses by name and shard id.

Signature

declare const [Equal.symbol]: (that: SingletonAddress) => boolean

Source

Since v4.0.0

Marks this value as a cluster singleton address for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/SingletonAddress"

Source

Since v4.0.0