real-time-ws-pubsub-baas-api
sanic
async, asyncio-redis
Channel List(GET)
http://{hostname}/v1/channel
response :
{
"data": [
{
"channel_name": "a_channel",
"cnt": 3,
"rpm": 0
}
]
}
Publish(POST)
http://{hostname}/v1/channel/<channel_name>/publish
response:
{
"status": "ok"
}
Channel Event
http://{hostname}/channel/{channel_name}/
- subscribe
- channel data set redis
- websocket send & receive response:
{
"header":"exchange",
"body": {"msg":"ok"}
}