Type Alias: IsolatedImplementationFactory<S>
ts
type IsolatedImplementationFactory<S> = (input: {
emit: IsolatedEmitter<S>;
hostcall: (
method: string,
args: WireValue[],
maxBytes?: number,
) => Promise<WireValue | string>;
}) => IsolatedImplementation<S>;Defined in: src/batteries/isolation/serve.ts:51
The implementation factory serveIsolated/serveIsolatedOverPort calls once, up front, to obtain the guest-side method/stream implementations plus the emit capability for declared events.
Type Parameters
| Type Parameter |
|---|
S extends IsolatedServiceSpec |
Parameters
| Parameter | Type | Description |
|---|---|---|
input | { emit: IsolatedEmitter<S>; hostcall: (method: string, args: WireValue[], maxBytes?: number) => Promise<WireValue | string>; } | - |
input.emit | IsolatedEmitter<S> | - |
input.hostcall | (method: string, args: WireValue[], maxBytes?: number) => Promise<WireValue | string> | Issue a guest-to-host capability call. |