Options for ipcServer — Unix-domain RPC (same-machine).
export interface IpcServerOptions {
/** Filesystem path for the Unix-domain listen socket (required). */
readonly IpcServerOptions.path: stringFilesystem path for the Unix-domain listen socket (required).
path: string;
readonly IpcServerOptions.serialization?: Layer.Layer<RpcSerialization.RpcSerialization>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>;
/**
* Node log key for auto-mounted node-status durable `logs.query`.
* When omitted, inferred from served tags' bound {@link Node} when all share one key.
*/
readonly IpcServerOptions.node?: string | {
readonly key: string;
} | undefined
Node log key for auto-mounted node-status durable logs.query.
When omitted, inferred from served tags' bound
Node
when all share one key.
node?: string | { readonly key: stringkey: string };
/**
* Best-effort `unlink` of `path` before bind and when the server scope closes
* (default `false` — same as {@link Lookup.layerOptions} / named-pipe listen).
* Opt in with `unlink: true` to clear a stale `.sock` from a previous crash; leaving the
* default avoids unlink-steal of a live peer's socket.
*/
readonly IpcServerOptions.unlink?: boolean | undefinedBest-effort unlink of path before bind and when the server scope closes
(default false — same as
Lookup.layerOptions
/ named-pipe listen).
Opt in with unlink: true to clear a stale .sock from a previous crash; leaving the
default avoids unlink-steal of a live peer's socket.
unlink?: boolean;
/**
* Soft Lookup directory advertise after serve registration (`Node.unix` / protocol listen).
*
* @internal
*/
readonly IpcServerOptions.advertiseNode?: AnyNode & { readonly key: string }Soft Lookup directory advertise after serve registration (Node.unix / protocol listen).
advertiseNode?: type AnyNode = NodeKey<unknown> & {
readonly url: string | undefined;
readonly path: string | undefined;
readonly kind: ProtocolKind | undefined;
readonly endpoints?: Endpoints;
readonly onConflict?: OnConflict;
readonly [portSym]?: number;
}
A
Tag
erased — its transport endpoints set, plus the primary address
(url and/or Unix path) and
ProtocolKind
kind (the first-declared endpoint, kept for
single-protocol readers), so a tag's distributed set is self-describing about where AND how to
reach each one.
AnyNode & { readonly key: stringkey: string };
/**
* Call-site advertise conflict policy (forwarded to {@link Lookup.directoryAdvertiseLayer}).
*
* @internal
*/
readonly IpcServerOptions.onConflict?: OnConflictCall-site advertise conflict policy (forwarded to
Lookup.directoryAdvertiseLayer
).
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 the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
/**
* Expected launcher ownership-ack token for {@link Node.assume} on the auto-mounted
* node-status Hyperlink.
*/
readonly IpcServerOptions.assumeToken?: string | Redacted.Redacted<string>Expected launcher ownership-ack token for
Node.assume
on the auto-mounted
node-status Hyperlink.
assumeToken?: string | import RedactedRedacted.interface Redacted<out A = string>A wrapper for sensitive values whose string, JSON, and inspection output is
redacted.
When to use
Use to carry sensitive values while reducing accidental exposure in string,
JSON, and inspection output.
Gotchas
The underlying value is still stored in memory and can be recovered with
Redacted.value until the wrapper is wiped or becomes unreachable. Use
Redacted to reduce accidental disclosure in logs and diagnostics, not as a
cryptographic protection mechanism.
Example (Creating redacted values)
import { Redacted } from "effect"
// Create a redacted value to protect sensitive information
const apiKey = Redacted.make("secret-key")
const userPassword = Redacted.make("user-password")
// TypeScript will infer the types as Redacted<string>
Namespace containing type-level members associated with Redacted values.
When to use
Use to access type-level helpers associated with Redacted.
Example (Using namespace utilities)
import { Redacted } from "effect"
// Use the Redacted namespace for type-level operations
const secret = Redacted.make("my-secret")
// The namespace contains utilities for working with Redacted values
const isRedacted = Redacted.isRedacted(secret) // true
Redacted<string>;
/**
* Cooperative `askIncumbent` handler — node-status `yield` (`true` = accept replace).
*/
readonly IpcServerOptions.onYield?: Effect.Effect<boolean>Cooperative askIncumbent handler — node-status yield (true = accept replace).
onYield?: import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<boolean>;
}