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

Method listGroups

conn.go:428–449  ·  view source on GitHub ↗

listGroups lists all the consumer groups See http://kafka.apache.org/protocol.html#The_Messages_ListGroups

(request listGroupsRequestV1)

Source from the content-addressed store, hash-verified

426//
427// See http://kafka.apache.org/protocol.html#The_Messages_ListGroups
428func (c *Conn) listGroups(request listGroupsRequestV1) (listGroupsResponseV1, error) {
429 var response listGroupsResponseV1
430
431 err := c.readOperation(
432 func(deadline time.Time, id int32) error {
433 return c.writeRequest(listGroups, v1, id, request)
434 },
435 func(deadline time.Time, size int) error {
436 return expectZeroSize(func() (remain int, err error) {
437 return (&response).readFrom(&c.rbuf, size)
438 }())
439 },
440 )
441 if err != nil {
442 return listGroupsResponseV1{}, err
443 }
444 if response.ErrorCode != 0 {
445 return listGroupsResponseV1{}, Error(response.ErrorCode)
446 }
447
448 return response, nil
449}
450
451// offsetCommit commits the specified topic partition offsets
452//

Callers 1

Calls 5

readOperationMethod · 0.95
writeRequestMethod · 0.95
expectZeroSizeFunction · 0.85
ErrorTypeAlias · 0.70
readFromMethod · 0.45

Tested by 1