Skip to main content

server-core/core

packages/server/src/core

Purpose

Narrow core wiring barrel for server-core internals.

Public surface

ConnectionHook

TypeAlias
Represents connection hook values.

ConnectionHooks

Interface
Describes connection hooks.

ConnectionHooksTag

Class
Implements connection hooks tag.

CoreApp

Interface
Describes core app.

createCoreApp

Function
Creates core app. Returns: The created core app.

DisconnectionHook

TypeAlias
Represents disconnection hook values.

makeTracingLayer

Function
Build a tracing Layer that wires the OTel SDK with the given span processor. The processor controls how spans get exported (OTLP batch in production; in-memory simple processor in tests). Returns: The created tracing layer.

readDefaultSpanProcessor

Variable
Default span-processor factory for production boot. Reads the OTLP endpoint env vars. If either is set, returns a BatchSpanProcessor wrapping an OTLPTraceExporter pointed at the resolved traces URL. The trace-specific OTEL_EXPORTER_OTLP_TRACES_ENDPOINT takes precedence over the base OTEL_EXPORTER_OTLP_ENDPOINT. If neither is set, returns null — the caller falls through to a no-op tracing Layer (spans stay in Effect’s fiber context but are not exported).

ResolvedServices

Interface
Describes resolved services.

resolveServices

Variable
Provides the resolve services runtime value.

resolveTracesEndpoint

Function
Resolves traces endpoint. Returns: The resolve traces endpoint result.

ServerBootFailedError

Class
Typed fatal for boot failure. The phase discriminator names which boot step failed: "http-listen" is NodeHttpServer.make / serverSvc.serve’s typed ServeError (EADDRINUSE, EACCES, …).

servicesLive

Variable
Provides the services live runtime value.

Files

  • app.ts
  • hooks.ts
  • layers.ts
  • tracing.ts
  • types.ts