Skip to content
1 min read · 93 words

Function: createIsolatedService()

ts
function createIsolatedService<S>(
  spec: S,
  transport: IsolationTransport,
  options?: IsolatedServiceOptions,
): IsolatedService<S>;

Defined in: src/batteries/isolation/host.ts:91

Build an IsolatedService over transport for spec. Connection + the first ready handshake begin immediately (fire-and-forget internally); calls made before ready queue inside the underlying HostEndpoint and flush in order once it arrives.

Type Parameters

Type Parameter
S extends IsolatedServiceSpec<MethodMap, StreamMap, EventMap>

Parameters

ParameterType
specS
transportIsolationTransport
options?IsolatedServiceOptions

Returns

IsolatedService<S>

Throws

@nhtio/adk/batteries/isolation!E_INVALID_ISOLATION_OPTIONS when options fails validation.