JS. Popcorn. Genserver
(Popcorn v0.4.0-next.3)
View Source
Summary
Functions
@spec async call(target: string | Pid, request?: unknown, opts?: CallOpts): Promise<Result<unknown>>
Calls a GenServer by registered name or Pid and waits for its reply.
Requires a running Popcorn.Proxy, registered as popcorn_proxy by default.
Parameters
opts-timeoutMsdefaults to 5 000 ms.proxyallows to select another registered proxy.
Returns
A Result with the reply or a bridge, VM, timeout, or GenServer error.
GenServer failures use genserver:noproc, genserver:exit, or genserver:unserializable.
A call timeout does not cancel server work.
@spec async cast(target: string | Pid, request?: unknown, opts?: {
proxy?: string;
}): Promise<Result<null>>
Sends a cast through the proxy.
Success confirms delivery to the proxy
Parameters
opts-proxyallows to select another registered proxy.