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

Function NewBytes

record.go:21–21  ·  view source on GitHub ↗

NewBytes constructs a Bytes value from a byte slice. If b is nil, nil is returned.

(b []byte)

Source from the content-addressed store, hash-verified

19//
20// If b is nil, nil is returned.
21func NewBytes(b []byte) Bytes { return protocol.NewBytes(b) }
22
23// ReadAll reads b into a byte slice.
24func ReadAll(b Bytes) ([]byte, error) { return protocol.ReadAll(b) }

Callers 11

TestClientDeleteOffsetFunction · 0.70
TestClientRawProduceFunction · 0.70
produceRecordsFunction · 0.70
TestClientPipelineFunction · 0.70
TestClientOffsetCommitFunction · 0.70
TestClientProduceFunction · 0.70
TestClientListOffsetsFunction · 0.70

Calls 1

NewBytesFunction · 0.92

Tested by 11

TestClientDeleteOffsetFunction · 0.56
TestClientRawProduceFunction · 0.56
produceRecordsFunction · 0.56
TestClientPipelineFunction · 0.56
TestClientOffsetCommitFunction · 0.56
TestClientProduceFunction · 0.56
TestClientListOffsetsFunction · 0.56