Class: Worker

Worker(config)

Worker Class Used to create new workers for Data Providers

Constructor

new Worker(config)

Constructor
Parameters:
Name Type Description
config Object
Source:

Methods

addCheck(handler, interval)

Add check
Parameters:
Name Type Description
handler function
interval number
Source:

afterStoreStare()

After store stare
Source:

handleMessage(msg)

Handle incoming message from Main process
Parameters:
Name Type Description
msg Object Message
Source:

send(data)

Send data to main process
Parameters:
Name Type Description
data *
Source:

sendOnChange(interval)

Send on state change
Parameters:
Name Type Description
interval number
Source:

sendState()

Send current state to main process
Source:

sendStateEvery(interval)

Send state every x ms - where x is given interval
Parameters:
Name Type Description
interval number
Source:

start()

Start
Source:

stop()

Stop
Source:

storeState(key, value)

Store state
Parameters:
Name Type Description
key string
value *
Source: