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

Function NewConn

conn.go:148–153  ·  view source on GitHub ↗

NewConn returns a new kafka connection for the given topic and partition.

(conn net.Conn, topic string, partition int)

Source from the content-addressed store, hash-verified

146
147// NewConn returns a new kafka connection for the given topic and partition.
148func NewConn(conn net.Conn, topic string, partition int) *Conn {
149 return NewConnWith(conn, ConnConfig{
150 Topic: topic,
151 Partition: partition,
152 })
153}
154
155func emptyToNullable(transactionalID string) (result *string) {
156 if transactionalID != "" {

Callers 1

TestBatchDontExpectEOFFunction · 0.70

Calls 1

NewConnWithFunction · 0.85

Tested by 1

TestBatchDontExpectEOFFunction · 0.56