MCPcopy
hub / github.com/segmentio/kafka-go / BrokerIDs

Method BrokerIDs

protocol/cluster.go:17–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func (c Cluster) BrokerIDs() []int32 {
18 brokerIDs := make([]int32, 0, len(c.Brokers))
19 for id := range c.Brokers {
20 brokerIDs = append(brokerIDs, id)
21 }
22 sort.Slice(brokerIDs, func(i, j int) bool {
23 return brokerIDs[i] < brokerIDs[j]
24 })
25 return brokerIDs
26}
27
28func (c Cluster) TopicNames() []string {
29 topicNames := make([]string, 0, len(c.Topics))

Callers 1

FormatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected