@terascope/teraslice-messaging / messenger/core / Core
Class: Core
Extends
EventEmitter
Extended by
Constructors
new Core()
new Core(
opts
):Core
Parameters
Parameter | Type |
---|---|
opts | CoreOptions |
Returns
Overrides
EventEmitter.constructor
Source
Properties
actionTimeout
protected
actionTimeout:number
Source
closed
closed:
boolean
=false
Source
logger
protected
logger:Logger
Source
networkLatencyBuffer
protected
networkLatencyBuffer:number
Source
Methods
close()
close():
void
Returns
void
Source
emit()
emit(
eventName
,msg
):void
Parameters
Parameter | Type |
---|---|
eventName | string |
msg | EventMessage |
Returns
void
Overrides
EventEmitter.emit
Source
getTimeout()
getTimeout(
timeout
?):number
Parameters
Parameter | Type |
---|---|
timeout ? | number |
Returns
number
Source
getTimeoutWithMax()
getTimeoutWithMax(
maxTimeout
):number
Parameters
Parameter | Type |
---|---|
maxTimeout | number |
Returns
number
Source
handleResponse()
protected
handleResponse(socket
,eventName
,fn
):void
Parameters
Parameter | Type |
---|---|
socket | SocketEmitter |
eventName | string |
fn | MessageHandler |
Returns
void
Source
handleSendResponse()
protected
handleSendResponse(sent
):Promise
<null
|Message
>
Parameters
Parameter | Type |
---|---|
sent | Message |
Returns
Promise
<null
| Message
>
Source
isClientReady()
isClientReady(
clientId
?):boolean
Parameters
Parameter | Type |
---|---|
clientId ? | string |
Returns
boolean
Source
onceWithTimeout()
onceWithTimeout(
eventName
,timeout
?):Promise
<any
>
Parameters
Parameter | Type |
---|---|
eventName | string |
timeout ? | number |
Returns
Promise
<any
>
Source
waitForClientReady()
waitForClientReady(
clientId
,timeout
?):Promise
<boolean
>
Parameters
Parameter | Type |
---|---|
clientId | string |
timeout ? | number |
Returns
Promise
<boolean
>