Skip to content

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.

2 exports Added in v4.0.0 Source

Constructors

make

Added in v4.0.0 Source

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

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;
}