@terascope/teraslice-messaging / execution-controller/client / Client
Class: Client
Extends
Constructors
new Client()
new Client(
opts
):Client
Parameters
Parameter | Type |
---|---|
opts | ClientOptions |
Returns
Overrides
Source
execution-controller/client.ts:11
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
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
workerId
workerId:
string
Source
execution-controller/client.ts:9
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
onExecutionFinished()
onExecutionFinished(
fn
):void
Parameters
Parameter | Type |
---|---|
fn | () => void |
Returns
void
Source
execution-controller/client.ts:80
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
sendSliceComplete()
sendSliceComplete(
payload
):Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
payload | SliceCompletePayload |
Returns
Promise
<null
| Message
>
Source
execution-controller/client.ts:84
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
execution-controller/client.ts:52
waitForClientReady()
waitForClientReady(
clientId
,timeout
?):Promise
<boolean
>
Parameters
Parameter | Type |
---|---|
clientId | string |
timeout ? | number |
Returns
Promise
<boolean
>
Inherited from
Source
waitForSlice()
waitForSlice(
fn
,timeoutMs
):Promise
<undefined
|Slice
>
Parameters
Parameter | Type |
---|---|
fn | WaitUntilFn |
timeoutMs | number |
Returns
Promise
<undefined
| Slice
>