current description about GET /lookup miss description about response(http status code and http response body),if add more info about response maybe helpful for user(#44 is good).
GET /lookup
Returns a list of producers for a topic
Request Params:
| name |
optional |
type |
location |
description |
| topic |
NO |
String |
Query |
the topic to list producers for |
Response Params:
| name |
type |
description |
| channels |
List |
channels of this topic |
| producers |
List |
producer of this topic |
Producer
| name |
type |
description |
| remote_address |
String |
|
| hostname |
String |
|
| broadcast_address |
String |
|
| tcp_port |
Int |
|
| http_port |
Int |
|
| version |
String |
|
Request example:
curl -i http://localhost:4161/lookup?topic=test
Response example:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Nsq-Content-Type: nsq; version=1.0
{
"channels":[
],
"producers":[
{
"remote_address":"127.0.0.1:56121",
"hostname":"DESKTOP-TJTHRU9",
"broadcast_address":"DESKTOP-TJTHRU9",
"tcp_port":4150,
"http_port":4151,
"version":"1.2.1"
}
]
}
If we think this helpful,i can make a PR to add more description about nsqlookupd's api
current description about
GET /lookupmiss description about response(http status code and http response body),if add more info about response maybe helpful for user(#44 is good).GET/lookupReturns a list of producers for a topic
Request Params:
Response Params:
Producer
Request example:
Response example:
If we think this helpful,i can make a PR to add more description about nsqlookupd's api