Interface for connector implementations.
Extends
- EventEmitter
Methods
close() → {Promise.<undefined>}
Returns:
- Type
- Promise.<undefined>
publish(channel, data) → {Promise.<undefined>}
Parameters:
Name | Type | Description |
---|---|---|
channel |
string | Channel. |
data |
Buffer | Data. |
Returns:
- Type
- Promise.<undefined>
subscribe(channel) → {Promise.<undefined>}
Parameters:
Name | Type | Description |
---|---|---|
channel |
string | Channel. |
Returns:
- Type
- Promise.<undefined>
unsubscribe(channel) → {Promise.<undefined>}
Parameters:
Name | Type | Description |
---|---|---|
channel |
string | Channel. |
Returns:
- Type
- Promise.<undefined>
Events
error
Event will be listened by EmitterPubsubBroker
instance.
Parameters:
Name | Type | Description |
---|---|---|
error |
Error | Error. |
message
Parameters:
Name | Type | Description |
---|---|---|
event |
string | Event name. |
data |
Buffer | Event data. |