Skip to main content

@terascope/teraslice-messaging / cluster-master/client / Client

Class: Client

Extends

Constructors

new Client()

new Client(opts): Client

Parameters

ParameterType
optsClientOptions

Returns

Client

Overrides

Client.constructor

Source

cluster-master/client.ts:9

Properties

actionTimeout

protected actionTimeout: number

Inherited from

Client.actionTimeout

Source

messenger/core.ts:15


available

available: boolean

Inherited from

Client.available

Source

messenger/client.ts:21


clientId

readonly clientId: string

Inherited from

Client.clientId

Source

messenger/client.ts:16


clientType

readonly clientType: string

Inherited from

Client.clientType

Source

messenger/client.ts:17


closed

closed: boolean = false

Inherited from

Client.closed

Source

messenger/core.ts:12


connectTimeout

readonly connectTimeout: number

Inherited from

Client.connectTimeout

Source

messenger/client.ts:19


exId

readonly exId: string

Source

cluster-master/client.ts:7


hostUrl

readonly hostUrl: string

Inherited from

Client.hostUrl

Source

messenger/client.ts:20


logger

protected logger: Logger

Inherited from

Client.logger

Source

messenger/core.ts:16


networkLatencyBuffer

protected networkLatencyBuffer: number

Inherited from

Client.networkLatencyBuffer

Source

messenger/core.ts:14


ready

ready: boolean

Inherited from

Client.ready

Source

messenger/client.ts:22


serverName

readonly serverName: string

Inherited from

Client.serverName

Source

messenger/client.ts:18


serverShutdown

protected serverShutdown: boolean

Inherited from

Client.serverShutdown

Source

messenger/client.ts:23


socket

readonly socket: Socket

Inherited from

Client.socket

Source

messenger/client.ts:15

Methods

close()

close(): void

Returns

void

Inherited from

Client.close

Source

messenger/core.ts:38


connect()

connect(): Promise<void>

Returns

Promise<void>

Inherited from

Client.connect

Source

messenger/client.ts:113


emit()

emit(eventName, msg): void

Parameters

ParameterType
eventNamestring
msgClientEventMessage

Returns

void

Inherited from

Client.emit

Source

messenger/client.ts:286


forceReconnect()

forceReconnect(): Promise<void>

Returns

Promise<void>

Inherited from

Client.forceReconnect

Source

messenger/client.ts:322


getTimeout()

getTimeout(timeout?): number

Parameters

ParameterType
timeout?number

Returns

number

Inherited from

Client.getTimeout

Source

messenger/core.ts:127


getTimeoutWithMax()

getTimeoutWithMax(maxTimeout): number

Parameters

ParameterType
maxTimeoutnumber

Returns

number

Inherited from

Client.getTimeoutWithMax

Source

messenger/core.ts:122


handleResponse()

protected handleResponse(socket, eventName, fn): void

Parameters

ParameterType
socketSocketEmitter
eventNamestring
fnMessageHandler

Returns

void

Inherited from

Client.handleResponse

Source

messenger/core.ts:64


handleSendResponse()

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

Parameters

ParameterType
sentMessage

Returns

Promise<null | Message>

Inherited from

Client.handleSendResponse

Source

messenger/core.ts:43


isClientReady()

isClientReady(): boolean

Returns

boolean

Inherited from

Client.isClientReady

Source

messenger/client.ts:291


onExecutionAnalytics()

onExecutionAnalytics(fn): void

Parameters

ParameterType
fnMessageHandler

Returns

void

Source

cluster-master/client.ts:80


onExecutionPause()

onExecutionPause(fn): void

Parameters

ParameterType
fnMessageHandler

Returns

void

Source

cluster-master/client.ts:84


onExecutionResume()

onExecutionResume(fn): void

Parameters

ParameterType
fnMessageHandler

Returns

void

Source

cluster-master/client.ts:88


onServerShutdown()

onServerShutdown(fn): void

Parameters

ParameterType
fn() => void

Returns

void

Inherited from

Client.onServerShutdown

Source

messenger/client.ts:99


onceWithTimeout()

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

Parameters

ParameterType
eventNamestring
timeout?number

Returns

Promise<any>

Inherited from

Client.onceWithTimeout

Source

messenger/core.ts:139


send()

protected send(eventName, payload, options): Promise<null | Message>

Parameters

ParameterType
eventNamestring
payloadPayload
optionsSendOptions

Returns

Promise<null | Message>

Inherited from

Client.send

Source

messenger/client.ts:254


sendAvailable()

sendAvailable(payload?): Promise<undefined | null | Message>

Parameters

ParameterType
payload?Payload

Returns

Promise<undefined | null | Message>

Inherited from

Client.sendAvailable

Source

messenger/client.ts:236


sendClusterAnalytics()

sendClusterAnalytics(stats, timeout?): Promise<null | Message>

Parameters

ParameterType
statsAggregatedExecutionAnalytics
timeout?number

Returns

Promise<null | Message>

Source

cluster-master/client.ts:53


sendExecutionFinished()

sendExecutionFinished(error?): undefined | Promise<null | Message>

Parameters

ParameterType
error?string

Returns

undefined | Promise<null | Message>

Source

cluster-master/client.ts:68


sendUnavailable()

sendUnavailable(payload?): Promise<undefined | null | Message>

Parameters

ParameterType
payload?Payload

Returns

Promise<undefined | null | Message>

Inherited from

Client.sendUnavailable

Source

messenger/client.ts:245


shutdown()

shutdown(): Promise<void>

Returns

Promise<void>

Inherited from

Client.shutdown

Source

messenger/client.ts:295


start()

start(): Promise<void>

Returns

Promise<void>

Source

cluster-master/client.ts:49


waitForClientReady()

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

Parameters

ParameterType
clientIdstring
timeout?number

Returns

Promise<boolean>

Inherited from

Client.waitForClientReady

Source

messenger/core.ts:108