Skip to main content

@terascope/teraslice-messaging / execution-controller/client / Client

Class: Client

Extends

Constructors

new Client()

new Client(opts): Client

Parameters

ParameterType
optsClientOptions

Returns

Client

Overrides

Client.constructor

Source

execution-controller/client.ts:11

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


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


workerId

workerId: string

Source

execution-controller/client.ts:9

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


onExecutionFinished()

onExecutionFinished(fn): void

Parameters

ParameterType
fn() => void

Returns

void

Source

execution-controller/client.ts:80


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


sendSliceComplete()

sendSliceComplete(payload): Promise<null | Message>

Parameters

ParameterType
payloadSliceCompletePayload

Returns

Promise<null | Message>

Source

execution-controller/client.ts:84


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

execution-controller/client.ts:52


waitForClientReady()

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

Parameters

ParameterType
clientIdstring
timeout?number

Returns

Promise<boolean>

Inherited from

Client.waitForClientReady

Source

messenger/core.ts:108


waitForSlice()

waitForSlice(fn, timeoutMs): Promise<undefined | Slice>

Parameters

ParameterType
fnWaitUntilFn
timeoutMsnumber

Returns

Promise<undefined | Slice>

Source

execution-controller/client.ts:91