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

Method assignments

createtopics.go:179–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177}
178
179func (t *TopicConfig) assignments() []createtopics.RequestAssignment {
180 if len(t.ReplicaAssignments) == 0 {
181 return nil
182 }
183 assignments := make([]createtopics.RequestAssignment, len(t.ReplicaAssignments))
184 for i, a := range t.ReplicaAssignments {
185 assignments[i] = createtopics.RequestAssignment{
186 PartitionIndex: a.partitionIndex(),
187 BrokerIDs: a.brokerIDs(),
188 }
189 }
190 return assignments
191}
192
193func (t *TopicConfig) configs() []createtopics.RequestConfig {
194 if len(t.ConfigEntries) == 0 {

Callers 1

CreateTopicsMethod · 0.45

Calls 2

partitionIndexMethod · 0.80
brokerIDsMethod · 0.80

Tested by

no test coverage detected