mirror of
https://github.com/ucloud/iotstack-driver-sdk-python.git
synced 2025-04-25 13:48:50 +08:00
add nats api
This commit is contained in:
parent
888231b933
commit
e357a0eaa5
@ -57,8 +57,8 @@
|
||||
|
||||
#### from uiotedgedriverlinksdk.nats
|
||||
|
||||
- **[natsPublish()](#register)**
|
||||
- **[natsSubscribe()](#set_on_topo_change_callback)**
|
||||
- **[natsPublish()](#natsPublish)**
|
||||
- **[natsSubscribe()](#natsSubscribe)**
|
||||
|
||||
---
|
||||
|
||||
|
@ -167,13 +167,20 @@ def natsSubscribe(subject, queue, cb):
|
||||
|
||||
def _start_pub():
|
||||
_natsClientPub().start()
|
||||
_natsClientPub().start()
|
||||
|
||||
|
||||
def _nats_pub():
|
||||
_natsPublish().start()
|
||||
|
||||
|
||||
def _start_sub():
|
||||
_natsClientSub().start()
|
||||
|
||||
|
||||
_t_pub = threading.Thread(target=_nats_pub)
|
||||
_t_pub.setDaemon(True)
|
||||
_t_pub.start()
|
||||
|
||||
_t_nats_pub = threading.Thread(target=_start_pub)
|
||||
_t_nats_pub.setDaemon(True)
|
||||
_t_nats_pub.start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user