RunnerAddress.ts
RunnerAddress.ts overview
Section titled “RunnerAddress.ts overview”Network addresses for locating cluster runners. A RunnerAddress stores the
host and port for a runner and provides schema support, structural equality,
hashing, Node.js inspection, and a stable primary key formatted from the host
and port.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”constructors
Section titled “constructors”Constructs a RunnerAddress from a host and port.
When to use
Use to create the stable network identity for a cluster runner when configuring sharding, registering runner metadata, or targeting a runner by host and port.
Details
The returned RunnerAddress stores the supplied host and port. Equality,
hashing, and the primary key use both fields, with the primary key formatted
as host:port.
Gotchas
make does not normalize the host. Pass the host string exactly as the
cluster routing and storage layers should identify it.
See
RunnerAddressfor the constructed address type and its equality, hashing, primary-key, and formatting behavior
Signature
declare const make: (host: string, port: number) => RunnerAddressSince v4.0.0
models
Section titled “models”RunnerAddress (class)
Section titled “RunnerAddress (class)”Represents the network address of a cluster runner, identified by host and port.
When to use
Use to represent the host and port that identify a runner in cluster routing, registration, and health checks.
Signature
declare class RunnerAddressSince v4.0.0
[Equal.symbol] (method)
Section titled “[Equal.symbol] (method)”Compares runner addresses by host and port.
Signature
declare const [Equal.symbol]: (that: RunnerAddress) => booleanSince v4.0.0
[Hash.symbol] (method)
Section titled “[Hash.symbol] (method)”Computes a structural hash from the host and port.
Signature
declare const [Hash.symbol]: () => numberSince v4.0.0
[PrimaryKey.symbol] (method)
Section titled “[PrimaryKey.symbol] (method)”Stable primary key used to identify the runner address.
Signature
declare const [PrimaryKey.symbol]: () => stringSince v4.0.0
toString (method)
Section titled “toString (method)”Formats the runner address with its host and port.
Signature
declare const toString: () => stringSince v4.0.0
[NodeInspectSymbol] (method)
Section titled “[NodeInspectSymbol] (method)”Formats the runner address for Node.js inspection.
Signature
declare const [NodeInspectSymbol]: () => stringSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster runner address for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/RunnerAddress"Since v4.0.0