ListenOptionsShared options for unix / http / ws (and low-level *Server) —
rpc path / health / ipc unlink. Not the TCP bind port (platform layer owns that).
export type type ListenOptions = {
readonly path?: HttpRouter.PathInput
readonly serialization?: Layer.Layer<RpcSerialization.RpcSerialization>
readonly health?: {
readonly path?: HttpRouter.PathInput
}
readonly node?:
| string
| {
readonly key: string
}
readonly unlink?: boolean
readonly onConflict?: OnConflict
}
Shared options for
unix
/
http
/
ws
(and low-level *Server) —
rpc path / health / ipc unlink. Not the TCP bind port (platform layer owns that).
ListenOptions = {
readonly path?: HttpRouter.PathInput | undefinedpath?: import HttpRouterHttpRouter.type PathInput = `/${string}` | "*"Path pattern accepted by the router. Routes must use an absolute path
beginning with / or the wildcard *.
PathInput;
readonly serialization?: | Layer.Layer<
RpcSerialization.RpcSerialization,
never,
never
>
| undefined
serialization?: import LayerLayer.interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<import RpcSerializationRpcSerialization.class RpcSerializationclass RpcSerialization {
key: Identifier;
Service: {
makeUnsafe: () => RpcSerialization.Parser;
contentType: string;
includesFraming: boolean;
};
}
Service that describes how RPC protocol messages are encoded and decoded,
including the content type and whether the serialization format provides
message framing.
When to use
Use to provide the serialization boundary shared by RPC clients and servers
for a chosen wire format.
RpcSerialization>;
readonly health?: | {
readonly path?: HttpRouter.PathInput
}
| undefined
health?: { readonly path?: HttpRouter.PathInput | undefinedpath?: import HttpRouterHttpRouter.type PathInput = `/${string}` | "*"Path pattern accepted by the router. Routes must use an absolute path
beginning with / or the wildcard *.
PathInput };
readonly node?: | string
| {
readonly key: string
}
| undefined
node?: string | { readonly key: stringkey: string };
readonly unlink?: boolean | undefinedunlink?: boolean;
/**
* Directory advertise conflict policy for this listen (call-site; wins over node stamp).
* Omit / `"inherit"` → continue resolve chain.
*/
readonly onConflict?: OnConflictDirectory advertise conflict policy for this listen (call-site; wins over node stamp).
Omit / "inherit" → continue resolve chain.
onConflict?: type OnConflict =
| "livenessReplace"
| "askIncumbent"
| "reject"
| "inherit"
Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks NodeStatus.yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
};