PURISTA API / Modules / @purista/mqttbridge / TopicRouter
Class: TopicRouter
@purista/mqttbridge.TopicRouter
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new TopicRouter(logger?
): TopicRouter
Parameters
Name | Type |
---|---|
logger? | Logger |
Returns
Defined in
mqttbridge/src/topic/TopicRouter.ts:13
Properties
counter
• counter: number
= 1
Defined in
mqttbridge/src/topic/TopicRouter.ts:11
logger
• logger: Logger
Defined in
mqttbridge/src/topic/TopicRouter.ts:9
routes
• routes: Map
<number
, { fn
: IncomingMessageFunction
; topic
: string
}>
Defined in
mqttbridge/src/topic/TopicRouter.ts:8
Methods
add
▸ add(topic
, fn
): number
Parameters
Name | Type |
---|---|
topic | string |
fn | IncomingMessageFunction |
Returns
number
Defined in
mqttbridge/src/topic/TopicRouter.ts:18
match
▸ match(topic
, id?
): IncomingMessageFunction
[]
Parameters
Name | Type |
---|---|
topic | string |
id? | number |
Returns
Defined in
mqttbridge/src/topic/TopicRouter.ts:32
remove
▸ remove(topic
): void
Parameters
Name | Type |
---|---|
topic | string | number |
Returns
void