Skip to main content

@terascope/teraslice-messaging / messenger/core / Core

Class: Core

Extends

  • EventEmitter

Extended by

Constructors

new Core()

new Core(opts): Core

Parameters

ParameterType
optsCoreOptions

Returns

Core

Overrides

EventEmitter.constructor

Source

messenger/core.ts:19

Properties

actionTimeout

protected actionTimeout: number

Source

messenger/core.ts:16


closed

closed: boolean = false

Source

messenger/core.ts:13


logger

protected logger: Logger

Source

messenger/core.ts:17


networkLatencyBuffer

protected networkLatencyBuffer: number

Source

messenger/core.ts:15

Methods

close()

close(): void

Returns

void

Source

messenger/core.ts:39


emit()

emit(eventName, msg): void

Parameters

ParameterType
eventNamestring
msgEventMessage

Returns

void

Overrides

EventEmitter.emit

Source

messenger/core.ts:144


getTimeout()

getTimeout(timeout?): number

Parameters

ParameterType
timeout?number

Returns

number

Source

messenger/core.ts:139


getTimeoutWithMax()

getTimeoutWithMax(maxTimeout): number

Parameters

ParameterType
maxTimeoutnumber

Returns

number

Source

messenger/core.ts:134


handleResponse()

protected handleResponse(socket, eventName, fn): void

Parameters

ParameterType
socketSocketEmitter
eventNamestring
fnMessageHandler

Returns

void

Source

messenger/core.ts:76


handleSendResponse()

protected handleSendResponse(sent, signal?): Promise<null | Message>

Parameters

ParameterType
sentMessage
signal?AbortSignal

Returns

Promise<null | Message>

Source

messenger/core.ts:44


isClientReady()

isClientReady(clientId?): boolean

Parameters

ParameterType
clientId?string

Returns

boolean

Source

messenger/core.ts:115


onceWithTimeout()

onceWithTimeout(eventName, timeout?, abortSignal?): Promise<any>

Parameters

ParameterType
eventNamestring
timeout?number
abortSignal?AbortSignal

Returns

Promise<any>

Source

messenger/core.ts:151


waitForClientReady()

waitForClientReady(clientId, timeout?): Promise<boolean>

Parameters

ParameterType
clientIdstring
timeout?number

Returns

Promise<boolean>

Source

messenger/core.ts:120