@terascope/teraslice-messaging / cluster-master/client / Client
Class: Client
Extends
Constructors
new Client()
new Client(
opts
):Client
Parameters
Parameter | Type |
---|---|
opts | ClientOptions |
Returns
Overrides
Source
Properties
actionTimeout
protected
actionTimeout:number
Inherited from
Source
available
available:
boolean
Inherited from
Source
clientId
readonly
clientId:string
Inherited from
Source
clientType
readonly
clientType:string
Inherited from
Source
closed
closed:
boolean
=false
Inherited from
Source
connectTimeout
readonly
connectTimeout:number
Inherited from
Source
exId
readonly
exId:string
Source
hostUrl
readonly
hostUrl:string
Inherited from
Source
logger
protected
logger:Logger
Inherited from
Source
networkLatencyBuffer
protected
networkLatencyBuffer:number
Inherited from
Source
ready
ready:
boolean
Inherited from
Source
serverName
readonly
serverName:string
Inherited from
Source
serverShutdown
protected
serverShutdown:boolean
Inherited from
Source
socket
readonly
socket:Socket
Inherited from
Source
Methods
close()
close():
void
Returns
void
Inherited from
Source
connect()
connect():
Promise
<void
>
Returns
Promise
<void
>
Inherited from
Source
emit()
emit(
eventName
,msg
):void
Parameters
Parameter | Type |
---|---|
eventName | string |
msg | ClientEventMessage |
Returns
void
Inherited from
Source
forceReconnect()
forceReconnect():
Promise
<void
>
Returns
Promise
<void
>
Inherited from
Source
getTimeout()
getTimeout(
timeout
?):number
Parameters
Parameter | Type |
---|---|
timeout ? | number |
Returns
number
Inherited from
Source
getTimeoutWithMax()
getTimeoutWithMax(
maxTimeout
):number
Parameters
Parameter | Type |
---|---|
maxTimeout | number |
Returns
number
Inherited from
Source
handleResponse()
protected
handleResponse(socket
,eventName
,fn
):void
Parameters
Parameter | Type |
---|---|
socket | SocketEmitter |
eventName | string |
fn | MessageHandler |
Returns
void
Inherited from
Source
handleSendResponse()
protected
handleSendResponse(sent
):Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
sent | Message |
Returns
Promise
<null
| Message
>
Inherited from
Source
isClientReady()
isClientReady():
boolean
Returns
boolean
Inherited from
Source
onExecutionAnalytics()
onExecutionAnalytics(
fn
):void
Parameters
Parameter | Type |
---|---|
fn | MessageHandler |
Returns
void
Source
onExecutionPause()
onExecutionPause(
fn
):void
Parameters
Parameter | Type |
---|---|
fn | MessageHandler |
Returns
void
Source
onExecutionResume()
onExecutionResume(
fn
):void
Parameters
Parameter | Type |
---|---|
fn | MessageHandler |
Returns
void
Source
onServerShutdown()
onServerShutdown(
fn
):void
Parameters
Parameter | Type |
---|---|
fn | () => void |
Returns
void
Inherited from
Source
onceWithTimeout()
onceWithTimeout(
eventName
,timeout
?):Promise
<any
>
Parameters
Parameter | Type |
---|---|
eventName | string |
timeout ? | number |
Returns
Promise
<any
>
Inherited from
Source
send()
protected
send(eventName
,payload
,options
):Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
eventName | string |
payload | Payload |
options | SendOptions |
Returns
Promise
<null
| Message
>
Inherited from
Source
sendAvailable()
sendAvailable(
payload
?):Promise
<undefined
|null
|Message
>
Parameters
Parameter | Type |
---|---|
payload ? | Payload |
Returns
Promise
<undefined
| null
| Message
>
Inherited from
Source
sendClusterAnalytics()
sendClusterAnalytics(
stats
,timeout
?):Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
stats | AggregatedExecutionAnalytics |
timeout ? | number |
Returns
Promise
<null
| Message
>
Source
sendExecutionFinished()
sendExecutionFinished(
error
?):undefined
|Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
error ? | string |
Returns
undefined
| Promise
<null
| Message
>
Source
sendUnavailable()
sendUnavailable(
payload
?):Promise
<undefined
|null
|Message
>
Parameters
Parameter | Type |
---|---|
payload ? | Payload |
Returns
Promise
<undefined
| null
| Message
>
Inherited from
Source
shutdown()
shutdown():
Promise
<void
>
Returns
Promise
<void
>
Inherited from
Source
start()
start():
Promise
<void
>
Returns
Promise
<void
>
Source
waitForClientReady()
waitForClientReady(
clientId
,timeout
?):Promise
<boolean
>
Parameters
Parameter | Type |
---|---|
clientId | string |
timeout ? | number |
Returns
Promise
<boolean
>