InMemoryTransport
Defined in: src/cluster/Transport.ts:294
A transport that keeps everything inside the current process. Useful for tests where we want to simulate a cluster without opening TCP sockets.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InMemoryTransport(
self):InMemoryTransport
Defined in: src/cluster/Transport.ts:301
Parameters
Section titled “Parameters”Returns
Section titled “Returns”InMemoryTransport
Properties
Section titled “Properties”
readonlyself:NodeAddress
Defined in: src/cluster/Transport.ts:301
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”disconnect()
Section titled “disconnect()”disconnect(
_peer):void
Defined in: src/cluster/Transport.ts:325
Close the connection to a peer.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”peers()
Section titled “peers()”peers():
NodeAddress[]
Defined in: src/cluster/Transport.ts:327
Peers currently connected (either inbound or outbound).
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”send()
Section titled “send()”send(
to,msg):void
Defined in: src/cluster/Transport.ts:314
Best-effort fire-and-forget send. Opens a connection on first use.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”setHandler()
Section titled “setHandler()”setHandler(
handler):void
Defined in: src/cluster/Transport.ts:303
Parameters
Section titled “Parameters”handler
Section titled “handler”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”shutdown()
Section titled “shutdown()”shutdown():
Promise<void>
Defined in: src/cluster/Transport.ts:309
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”start()
Section titled “start()”start():
Promise<void>
Defined in: src/cluster/Transport.ts:305
Returns
Section titled “Returns”Promise<void>