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:18

Properties

actionTimeout

protected actionTimeout: number

Source

messenger/core.ts:15


closed

closed: boolean = false

Source

messenger/core.ts:12


logger

protected logger: Logger

Source

messenger/core.ts:16


networkLatencyBuffer

protected networkLatencyBuffer: number

Source

messenger/core.ts:14

Methods

close()

close(): void

Returns

void

Source

messenger/core.ts:38


emit()

emit(eventName, msg): void

Parameters

ParameterType
eventNamestring
msgEventMessage

Returns

void

Overrides

EventEmitter.emit

Source

messenger/core.ts:132


getTimeout()

getTimeout(timeout?): number

Parameters

ParameterType
timeout?number

Returns

number

Source

messenger/core.ts:127


getTimeoutWithMax()

getTimeoutWithMax(maxTimeout): number

Parameters

ParameterType
maxTimeoutnumber

Returns

number

Source

messenger/core.ts:122


handleResponse()

protected handleResponse(socket, eventName, fn): void

Parameters

ParameterType
socketSocketEmitter
eventNamestring
fnMessageHandler

Returns

void

Source

messenger/core.ts:64


handleSendResponse()

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

Parameters

ParameterType
sentMessage

Returns

Promise<null | Message>

Source

messenger/core.ts:43


isClientReady()

isClientReady(clientId?): boolean

Parameters

ParameterType
clientId?string

Returns

boolean

Source

messenger/core.ts:103


onceWithTimeout()

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

Parameters

ParameterType
eventNamestring
timeout?number

Returns

Promise<any>

Source

messenger/core.ts:139


waitForClientReady()

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

Parameters

ParameterType
clientIdstring
timeout?number

Returns

Promise<boolean>

Source

messenger/core.ts:108