Same-machine default Lookup — layerOptions() on defaultIpcPath.
Use Layer.provide(Lookup.layer) with no call. Override path via layerOptions.
Effect precedent: layerAgent = layerAgentOptions().
export const const layer: Layer.Layer<Services>const layer: {
build: (memoMap: Layer.MemoMap, scope: Scope) => Effect.Effect<Context<Services>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Same-machine default Lookup —
layerOptions
() on
defaultIpcPath
.
Use Layer.provide(Lookup.layer) with no call. Override path via
layerOptions
.
Effect precedent: layerAgent = layerAgentOptions().
layer: 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<type Services =
| Identity
| Directory
| Advice
Services a Lookup client layer provides — identity, directory, and placement advice.
Services> = const layerOptions: (options?: {
readonly path?: string
readonly unlink?: boolean
}) => Layer.Layer<Services>
Bind-or-dial a same-machine Lookup path (L1 / D7).
First process serves
Identity
+
Directory
+
Advice
; later processes dial
(Layer.catchCause). Default unlink: false so a second process cannot unlink-steal
a live sock (stale socks: pass unlink: true or a fresh path).
Effect precedent: layerAgentOptions — pair with
layer
for the zero-config value.
layerOptions();