RunnerAddress
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.
Constructors
Models
RunnerAddress
Added in v4.0.0
Source
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 RunnerAddress extends {
readonly host: string;
readonly port: number;
} {
constructor(...args: [props: {
readonly host: string;
readonly port: number;
}, options?: MakeOptions]);
readonly "~effect/cluster/RunnerAddress": "~effect/cluster/RunnerAddress";
[NodeInspectSymbol](): string;
"~effect/interfaces/Equal"(that: RunnerAddress): boolean;
"~effect/interfaces/Hash"(): number;
"~effect/interfaces/PrimaryKey"(): string;
toString(): string;
}
Constructs a
RunnerAddressfrom 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
RunnerAddressstores the suppliedhostandport. Equality, hashing, and the primary key use both fields, with the primary key formatted ashost:port.Gotchas
makedoes 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