Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

RunnerAddress unstable

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.

2 exports Since v4.0.0 Source

Constructors

make

unstable
Since v4.0.0

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

  • RunnerAddress for the constructed address type and its equality, hashing, primary-key, and formatting behavior

Signature

declare function make(host: string, port: number): RunnerAddress

Models

Since v4.0.0

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/Equal"(that: RunnerAddress): boolean;
"~effect/Hash"(): number;
"~effect/PrimaryKey"(): string;
toString(): string;
}