Channel

Channel

Class encapsulating channel

Constructor

new Channel(check)

Source:

Constructor accepting check function

Parameters:
Name Type Description
check function

to check/filter message for specific channel

Methods

attach(worker) → {object}

Source:

Add worker

Parameters:
Name Type Description
worker object

worker to add to channel

Returns:

self

Type
object

remove()

Source:

Removing worker from channel

send(_id, cmd, data)

Source:

Send message to this channel

Parameters:
Name Type Description
_id string

id of channel

cmd object

command

data object

additional data