michaelklishin / rabbit-hole

RabbitMQ HTTP API client in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetQueue fails to unmarshal

mcwarman opened this issue · comments

GetQueue fails to unmarshall API response.

Error:

json: cannot unmarshal string into Go struct field ChannelDetails.consumer_details.channel_details.peer_port of type uint

Making a call to the API directly I can see the following response:

{
  "consumer_details": [
    {
      "arguments": {},
      "channel_details": {
        "connection_name": "<rabbit@rabbitmq-0.rabbitmq-headless.rabbit.svc.cluster.local.1689630008.13328.3393>",
        "name": "<rabbit@rabbitmq-0.rabbitmq-headless.rabbit.svc.cluster.local.1689630008.13328.3393> (1)",
        "node": "rabbit@rabbitmq-0.rabbitmq-headless.rabbit.svc.cluster.local",
        "number": 1,
        "peer_host": "undefined",
        "peer_port": "undefined",
        "user": "none"
      },
  //...
}

Probably needs something similar to #207