Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / coroutines/src/public-api / registerActorRequestHandler

Function: registerActorRequestHandler()

registerActorRequestHandler<Q, D>(name, handler): () => void

Defined in: projects/libraries/streamix/coroutines/src/lib/abstractions/actor.ts:248

Registers a main-thread request handler for a target actor name. Workers call utils.outbox.request(name, topic, payload) — the handler registered for name receives the call and returns the response.

Register "main" to handle requests sent to the main thread.

Type Parameters

Q

Q = any

D

D = any

Parameters

name

string

handler

ActorRequestHandler<Q, D>

Returns

(): void

Returns

void

Released under the GNU AGPL v3 or later.