()
| 484 | } |
| 485 | |
| 486 | func (ca *clusterAdmin) findAnyBroker() (*Broker, error) { |
| 487 | brokers := ca.client.Brokers() |
| 488 | if len(brokers) > 0 { |
| 489 | index := rand.Intn(len(brokers)) |
| 490 | return brokers[index], nil |
| 491 | } |
| 492 | return nil, errors.New("no available broker") |
| 493 | } |
| 494 | |
| 495 | func (ca *clusterAdmin) ListTopics() (map[string]TopicDetail, error) { |
| 496 | // In order to build TopicDetails we need to first get the list of all |
no test coverage detected